tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

no-granted-devices.https.window.js (643B)


      1 // META: script=/resources/testdriver.js?feature=bidi
      2 // META: script=/resources/testdriver-vendor.js
      3 // META: script=/bluetooth/resources/bluetooth-test.js
      4 // META: script=/bluetooth/resources/bluetooth-fake-devices.js
      5 // META: timeout=long
      6 'use strict';
      7 const test_desc = 'getDevices() resolves with empty array if no device ' +
      8    'permissions have been granted.';
      9 
     10 bluetooth_bidi_test(async () => {
     11  await navigator.bluetooth.test.simulateCentral({state: 'powered-on'});
     12  let devices = await navigator.bluetooth.getDevices();
     13 
     14  assert_equals(
     15      0, devices.length, 'getDevices() should resolve with an empty array');
     16 }, test_desc);