idl-Bluetooth.https.window.js (620B)
1 // META: script=/resources/testdriver.js?feature=bidi 2 // META: script=/resources/testdriver-vendor.js 3 'use strict'; 4 const test_desc = 'Bluetooth IDL test'; 5 6 test(() => { 7 assert_throws_js( 8 TypeError, () => new Bluetooth(), 9 'the constructor should not be callable with "new"'); 10 assert_throws_js( 11 TypeError, () => Bluetooth(), 'the constructor should not be callable'); 12 13 // Bluetooth implements BluetoothDiscovery; 14 assert_true('requestDevice' in navigator.bluetooth); 15 assert_true('getDevices' in navigator.bluetooth); 16 assert_equals(navigator.bluetooth.requestDevice.length, 0); 17 }, test_desc);