tor-browser

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

picture-in-picture-allowed-by-feature-policy.https.sub.html (1271B)


      1 <!DOCTYPE html>
      2 <body>
      3  <script src=/common/media.js></script>
      4  <script src=/resources/testharness.js></script>
      5  <script src=/resources/testharnessreport.js></script>
      6  <script src=/resources/testdriver.js></script>
      7  <script src=/resources/testdriver-vendor.js></script>
      8  <script src=/feature-policy/resources/featurepolicy.js></script>
      9  <script src=/feature-policy/resources/picture-in-picture.js></script>
     10  <script>
     11  'use strict';
     12  const same_origin_src = '/feature-policy/resources/feature-policy-picture-in-picture.html';
     13  const cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' +
     14    same_origin_src;
     15  const header = 'Feature-Policy header: picture-in-picture *';
     16 
     17  async_pip_test(t => {
     18    isPictureInPictureAllowed().then(t.step_func_done((result) => {
     19      assert_true(result);
     20    }));
     21  }, header + ' allows the top-level document.');
     22 
     23  async_pip_test(t => {
     24    test_feature_availability('picture-in-picture', t, same_origin_src,
     25        expect_feature_available_default);
     26  }, header + ' allows same-origin iframes.');
     27 
     28  async_pip_test(t => {
     29    test_feature_availability('picture-in-picture', t, cross_origin_src,
     30        expect_feature_available_default);
     31  }, header + ' allows cross-origin iframes.');
     32  </script>
     33 </body>