tor-browser

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

test_abort_on_reload.html (863B)


      1 <!--
      2  Any copyright is dedicated to the Public Domain.
      3  http://creativecommons.org/publicdomain/zero/1.0/
      4 -->
      5 <html>
      6 <head>
      7  <title>Indexed Database Test</title>
      8 
      9  <script src="/tests/SimpleTest/SimpleTest.js"></script>
     10  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     11 
     12  <script type="text/javascript">
     13    let openedWindow
     14    let reloads = 0
     15 
     16    function openWindow() {
     17      openedWindow = window.open("abort_on_reload.html");
     18    }
     19 
     20    function messageListener() {
     21      ok(true, "reload recorded");
     22 
     23      if (++reloads == 20) {
     24        openedWindow.close();
     25        SimpleTest.finish();
     26      }
     27    }
     28 
     29    function runTest() {
     30      SimpleTest.waitForExplicitFinish();
     31 
     32      window.addEventListener("message", messageListener);
     33 
     34      openWindow();
     35    }
     36  </script>
     37 
     38 </head>
     39 
     40 <body onload="runTest();">
     41 </body>
     42 
     43 </html>