1
0
Fork 0
firefox/testing/web-platform/tests/bluetooth/legacy/idl/idl-Bluetooth.https.window.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

18 lines
No EOL
612 B
JavaScript

// 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);