tor-browser

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

test_bug1583110.html (1008B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <meta charset="utf-8">
      5  <title>test bug 1583110</title>
      6  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      7  <link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
      8  <script>
      9    SimpleTest.waitForExplicitFinish();
     10    var bc = SpecialPowers.wrap(BroadcastChannel).unpartitionedTestingChannel("bug1583110");
     11    var pageshowCount = 0;
     12    bc.onmessage = function(event) {
     13      ok(event.data.type == "pageshow");
     14      ++pageshowCount;
     15      if (pageshowCount == 1) {
     16        bc.postMessage("loadnext");
     17      } else if (pageshowCount == 2) {
     18        bc.postMessage("back");
     19      } else {
     20        ok(event.data.persisted, "Should have persisted the first page");
     21        bc.close();
     22        SimpleTest.finish();
     23      }
     24    }
     25 
     26    function test() {
     27      window.open("file_bug1583110.html", "", "noopener");
     28    }
     29  </script>
     30 </head>
     31 <body onload="test()">
     32 <p id="display"></p>
     33 <div id="content" style="display: none"></div>
     34 <pre id="test"></pre>
     35 </body>
     36 </html>