tor-browser

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

file_shiftReload_and_pushState.html (685B)


      1 <html>
      2  <head>
      3    <script>
      4      function test() {
      5        try {
      6          frames[0].history.pushState({}, "state", "?pushed");
      7        } catch (ex) {
      8          opener.ok(false, "history.pushState shouldn't throw");
      9        }
     10 
     11        if (!opener.shiftReloadPushStateFirstRound) {
     12          opener.shiftReloadPushStateFirstRound = true;
     13          window.location.reload(true);
     14        } else {
     15          opener.ok(true, "Did run history.push");
     16          opener.finishTest();
     17        }
     18      }
     19 
     20      window.addEventListener("load", function() { setTimeout(test, 0); });
     21    </script>
     22  </head>
     23  <body>
     24  <iframe src="frame0.html"></iframe>
     25  <script>
     26  </script>
     27  </body>
     28 </html>