tor-browser

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

bluetooth-allowed-by-permissions-policy-attribute.https.sub.html (1122B)


      1 <!DOCTYPE html>
      2 <body>
      3  <script src=/resources/testharness.js></script>
      4  <script src=/resources/testharnessreport.js></script>
      5  <script src=/bluetooth/resources/bluetooth-test.js></script>
      6  <script src=/permissions-policy/resources/permissions-policy.js></script>
      7  <script>
      8    'use strict'
      9 
     10    const same_origin_src = '/permissions-policy/resources/permissions-policy-bluetooth.html';
     11    const cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' + same_origin_src;
     12    const feature_name = 'permissions policy "bluetooth"';
     13    const header = 'allow="bluetooth" attribute';
     14 
     15    bluetooth_test(() => {
     16      async_test(t => {
     17        test_feature_availability('bluetooth.getDevices()', t, same_origin_src, expect_feature_available_default, 'bluetooth');
     18      }, feature_name + ' can be enabled in same-origin iframe using ' + header);
     19 
     20      async_test(t => {
     21        test_feature_availability('bluetooth.getDevices()', t, cross_origin_src, expect_feature_available_default, 'bluetooth');
     22      }, feature_name + ' can be enabled in cross-origin iframe using ' + header);
     23    });
     24  </script>
     25 </body>