tor-browser

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

named-lookup-scoped-to-browsing-context-group.html (963B)


      1 <!DOCTYPE html>
      2 <title>Named lookup scoped to browsing context group</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="/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js"></script>
      8 
      9 <body>
     10 <script>
     11 
     12 promise_test(async t => {
     13  const rcHelper = new RemoteContextHelper();
     14  // This test harness cannot be in the same browsing context group as the
     15  // popup.
     16  const rcPopup1 = await rcHelper.addWindow(undefined, { features: 'noopener' });
     17 
     18  await rcPopup1.executeScript(() => {
     19    window.name = 'my_popup';
     20    window.firstPopup = true;
     21  });
     22  assert_equals(window.open('', 'my_popup').firstPopup, undefined,
     23                'cannot lookup across browsing context groups');
     24 }, 'named lookup scoped to browsing context group');
     25 
     26 </script>
     27 </body>