diff options
Diffstat (limited to 'testing/web-platform/tests/bluetooth/idl/idl-Bluetooth.https.window.js')
-rw-r--r-- | testing/web-platform/tests/bluetooth/idl/idl-Bluetooth.https.window.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testing/web-platform/tests/bluetooth/idl/idl-Bluetooth.https.window.js b/testing/web-platform/tests/bluetooth/idl/idl-Bluetooth.https.window.js new file mode 100644 index 0000000000..2b40eaff49 --- /dev/null +++ b/testing/web-platform/tests/bluetooth/idl/idl-Bluetooth.https.window.js @@ -0,0 +1,18 @@ +// META: script=/resources/testdriver.js +// META: script=/resources/testdriver-vendor.js +'use strict'; +const test_desc = 'Bluetooth IDL test'; + +test(() => { + assert_throws_js( + TypeError, () => new Bluetooth(), + 'the constructor should not be callable with "new"'); + assert_throws_js( + TypeError, () => Bluetooth(), + 'the constructor should not be callable'); + + // Bluetooth implements BluetoothDiscovery; + assert_true('requestDevice' in navigator.bluetooth); + assert_true('getDevices' in navigator.bluetooth); + assert_equals(navigator.bluetooth.requestDevice.length, 0); +}, test_desc);
\ No newline at end of file |