Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /bluetooth/idl/idl-Bluetooth.https.window.html - WPT Dashboard Interop Dashboard
// 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);