tor-browser

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

deferred-fetch-allowed-by-permissions-policy-attribute.https.window.js (1269B)


      1 // META: title=Permissions Policy "deferred-fetch" is allowed by allow attribute
      2 // META: script=/permissions-policy/resources/permissions-policy.js
      3 // META: script=/common/utils.js
      4 // META: script=/common/get-host-info.sub.js
      5 // META: script=/fetch/fetch-later/resources/fetch-later-helper.js
      6 // META: script=/fetch/fetch-later/permissions-policy/resources/helper.js
      7 // META: timeout=long
      8 'use strict';
      9 
     10 const {
     11  HTTPS_ORIGIN,
     12  HTTPS_NOTSAMESITE_ORIGIN,
     13 } = get_host_info();
     14 
     15 const description = 'Permissions policy "deferred-fetch"';
     16 const attribute = 'allow="deferred-fetch" attribute';
     17 
     18 async_test(
     19    t => {
     20      test_feature_availability(
     21          'fetchLater()', t,
     22          getDeferredFetchPolicyInIframeHelperUrl(HTTPS_ORIGIN),
     23          expect_feature_available_default, /*feature_name=*/ 'deferred-fetch');
     24    },
     25    `${description} can be enabled in the same-origin iframe using ${
     26        attribute}.`);
     27 
     28 async_test(
     29    t => {
     30      test_feature_availability(
     31          'fetchLater()', t,
     32          getDeferredFetchPolicyInIframeHelperUrl(HTTPS_NOTSAMESITE_ORIGIN),
     33          expect_feature_available_default, /*feature_name=*/ 'deferred-fetch');
     34    },
     35    `${description} can be enabled in the cross-origin iframe using ${
     36        attribute}.`);