tor-browser

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

default-enabled-features-subframe.https.html (1541B)


      1 <!DOCTYPE html>
      2 <title>Test nested iframes inheriting permissions from fenced frames</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <script src="/common/utils.js"></script>
      6 <script src="/common/dispatcher/dispatcher.js"></script>
      7 <script src="resources/utils.js"></script>
      8 <script src="/common/get-host-info.sub.js"></script>
      9 
     10 <body>
     11 <script>
     12 promise_test(async(t) => {
     13  const key = token();
     14 
     15  const urn = await runSelectURL(
     16      'resources/default-enabled-features-subframe-fencedframe.https.html',
     17      [key, /*should_restrict_select_url=*/false]);
     18  const fencedframe = await attachFencedFrame(urn);
     19 
     20  const result = await nextValueFromServer(key);
     21  const [allows_shared_storage, allows_select_url] = result.split(",");
     22 
     23  assert_equals(allows_shared_storage, "false");
     24  assert_equals(allows_select_url, "true");
     25 }, 'Iframes nested in fenced frames inherit the fenced frame policies');
     26 
     27 promise_test(async(t) => {
     28  const key = token();
     29 
     30  const urn = await runSelectURL(
     31      'resources/default-enabled-features-subframe-fencedframe.https.html',
     32      [key, /*should_restrict_select_url=*/true]);
     33  const fencedframe = await attachFencedFrame(urn);
     34 
     35  const result = await nextValueFromServer(key);
     36  const [allows_shared_storage, allows_select_url] = result.split(",");
     37 
     38  assert_equals(allows_shared_storage, "false");
     39  assert_equals(allows_select_url, "false");
     40 }, 'Iframes nested in fenced frames can further restrict policies');
     41 </script>
     42 </body>
     43 </html>