tor-browser

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

webvr-enabled-by-feature-policy.https.sub.html (1006B)


      1 <!DOCTYPE html>
      2 <body>
      3  <script src=/resources/testharness.js></script>
      4  <script src=/resources/testharnessreport.js></script>
      5  <script src=/feature-policy/resources/featurepolicy.js></script>
      6 
      7  <script>
      8    'use strict';
      9    var same_origin_src = '/feature-policy/resources/feature-policy-webvr.html';
     10    var cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' +
     11      same_origin_src;
     12    var header = 'Feature-Policy header vr *';
     13 
     14    promise_test(
     15        () => navigator.getVRDisplays(),
     16        header + ' allows the top-level document.');
     17 
     18    async_test(t => {
     19      test_feature_availability(
     20          'navigator.getVRDisplays()', t, same_origin_src,
     21          expect_feature_available_default);
     22    }, header + ' allows same-origin iframes.');
     23 
     24    async_test(t => {
     25      test_feature_availability(
     26          'navigator.getVRDisplays()', t, cross_origin_src,
     27          expect_feature_available_default);
     28    }, header + ' allows cross-origin iframes.');
     29  </script>
     30 </body>