Update web-platform-tests to revision 0fe9f012a8ee5503b728a379705a6c5286ba1e96

This commit is contained in:
WPT Sync Bot 2018-02-23 20:08:37 -05:00
parent 8329a45163
commit 5dc1649544
69 changed files with 1716 additions and 112 deletions

View file

@ -0,0 +1,31 @@
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
<script>
'use strict';
const test_desc_idl = 'BluetoothDevice IDL test.';
test(() => {
assert_throws(new TypeError(), () => new BluetoothDevice(),
'the constructor should not be callable with "new"');
assert_throws(new TypeError(), () => BluetoothDevice(),
'the constructor should not be callable');
}, test_desc_idl);
const test_desc_attr = 'BluetoothDevice attributes.';
let device;
bluetooth_test(() => getHealthThermometerDevice()
.then(({device}) => {
assert_equals(device.constructor.name, 'BluetoothDevice');
var old_device_id = device.id;
assert_throws(new TypeError(), () => device.id = 'overwritten',
'the device id should not be writable');
assert_throws(new TypeError(), () => device.name = 'overwritten',
'the device name should not be writable');
assert_equals(device.id, old_device_id);
assert_equals(device.name, 'Health Thermometer');
}), test_desc_attr);
</script>