tor-browser

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

opener-noopener.html (923B)


      1 <!doctype html>
      2 <html>
      3  <head>
      4    <title>Auxiliary Browsing Contexts: window.opener noopener</title>
      5    <script src="/resources/testharness.js"></script>
      6    <script src="/resources/testharnessreport.js"></script>
      7    <script src="/common/PrefixedLocalStorage.js"></script>
      8  </head>
      9  <body>
     10    <div id="log"></div>
     11    <script>
     12    var prefixedLocalStorage;
     13    setup(() => prefixedLocalStorage = new PrefixedLocalStorageTest());
     14    async_test(t => {
     15      t.add_cleanup(() => prefixedLocalStorage.cleanup());
     16      prefixedLocalStorage.onSet('openerIsNull', t.step_func_done(e => {
     17        assert_equals(e.newValue, 'true');
     18      }));
     19      window.open(prefixedLocalStorage.url('resources/no-opener.html'),
     20        'iShouldNotHaveAnOpener',
     21        'noopener');
     22    }, 'Auxiliary browsing context created via `window.open` setting `noopener` should report `window.opener` `null`');
     23    </script>
     24  </body>
     25 </html>