tor-browser

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

sandbox-top-navigation-grandchild-sandboxed-cross-origin-parent.tentative.sub.window.js (862B)


      1 // META: title=Top-level navigation tests with grandchild frames
      2 // META: script=/common/dispatcher/dispatcher.js
      3 // META: script=/common/get-host-info.sub.js
      4 // META: script=/common/utils.js
      5 // META: script=/resources/testdriver.js
      6 // META: script=/resources/testdriver-vendor.js
      7 // META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js
      8 // META: script=./resources/sandbox-top-navigation-helper.sub.js
      9 
     10 'use strict';
     11 
     12 promise_test(async t => {
     13  const main = await setupTest();
     14  const iframe_1 = await createNestedIframe(main, 'HTTP_REMOTE_ORIGIN', '', '');
     15  const iframe_2 = await createNestedIframe(
     16      iframe_1, 'HTTP_ORIGIN', 'allow-top-navigation allow-same-origin', '');
     17 
     18  await attemptTopNavigation(iframe_2, true);
     19 }, 'A same-origin sandboxed grandchild in a cross-origin parent can navigate top');