tor-browser

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

window-close.https.html (668B)


      1 <!DOCTYPE html>
      2 <title>Test window.close has no effect</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 
      9 <body>
     10 <script>
     11 promise_test(async () => {
     12  const frame = attachFencedFrameContext();
     13    await frame.execute(async () => {
     14      // This should have no effect for fenced frames.
     15      window.close();
     16      // window.closed will be true if the window closing steps have begun.
     17      assert_false(window.closed);
     18  });
     19 }, 'window.close');
     20 </script>
     21 </body>