tor-browser

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

location_reload.html (1204B)


      1 <!DOCTYPE HTML>
      2 <html>
      3  <head>
      4    <title>location_reload</title>
      5    <script src="/resources/testharness.js"></script>
      6    <script src="/resources/testharnessreport.js"></script>
      7  </head>
      8  <body onload="startTest();">
      9    <div id="log"></div>
     10 
     11    <iframe></iframe>
     12 
     13    <script>
     14    var history_length;
     15    async_test(function(t) {
     16 
     17      var url = new URL("./location_reload-iframe.html", window.location).href;
     18 
     19      window._pingCount = 0;
     20      window._ping = t.step_func(function(innerURL) {
     21          // Some browsers keep 'about:blank' in the session history
     22          if (_pingCount == 0) {
     23            history_length = history.length;
     24          }
     25          assert_equals(url, innerURL, "iframe url (" + _pingCount + ")");
     26          assert_equals(history_length, history.length, "history length (" + _pingCount + ")");
     27          _pingCount++;
     28          if (_pingCount == 5) {
     29            t.done();
     30          }
     31      });
     32    });
     33 
     34    function startTest() {
     35      var url = new URL("./location_reload-iframe.html", window.location).href;
     36      var iframe = document.querySelector("iframe");
     37      iframe.src = url;
     38      history_length = history.length;
     39    }
     40    </script>
     41 
     42  </body>
     43 </html>