tor-browser

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

bluetooth-access.https.html (1045B)


      1 <!DOCTYPE html>
      2 <script src="/common/utils.js"></script>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <script src="/speculation-rules/prerender/resources/utils.js"></script>
      6 <script src="/speculation-rules/prerender/resources/deferred-promise-utils.js"></script>
      7 <script>
      8 
      9 const params = new URLSearchParams(location.search);
     10 
     11 // The main test page (restriction-bluetooth.https.html) loads the initiator
     12 // page, then the initiator page will prerender itself with the `prerendering`
     13 // parameter.
     14 if (!params.has('prerendering')) {
     15  loadInitiatorPage();
     16 } else {
     17  const prerenderEventCollector = new PrerenderEventCollector();
     18  // The spec, https://wicg.github.io/nav-speculation/prerendering.html#web-bluetooth-patch,
     19  // mentions getDevices() and requestDevice() but this test uses
     20  // getAvailability() instead of them.
     21  prerenderEventCollector.start(navigator.bluetooth.getAvailability(),
     22                                'navigator.bluetooth.getAvailability');
     23 }
     24 
     25 </script>