tor-browser

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

test_bug419132.html (1185B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=419132
      5 -->
      6 <head>
      7  <title>Test for Bug 419132</title>
      8  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      9  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     10 </head>
     11 <body>
     12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=419132">Mozilla Bug 419132</a>
     13 <p id="display"></p>
     14 <div id="content" style="display: none">
     15  
     16 </div>
     17 <iframe id="i"></iframe>
     18 <pre id="test">
     19 <script type="application/javascript">
     20 
     21 /** Test for Bug 419132 */
     22 
     23 SimpleTest.waitForExplicitFinish();
     24 addLoadEvent(function() {
     25  var iframe = document.getElementById("i");
     26  var loadCounts = 4;
     27  iframe.addEventListener("load", function() {
     28    if (--loadCounts == 0) {
     29      ok(true, "This is a mochikit version of a crash test. To complete is to pass.");
     30      SimpleTest.finish();
     31    } else {
     32      // Garbage collect after every other load
     33      if ((loadCounts % 2) == 1) {
     34        SpecialPowers.gc();
     35      }
     36      setTimeout(function() {
     37        iframe.contentWindow.location.reload();
     38      }, 0);
     39    }
     40  });
     41  iframe.src = "bug419132.html";
     42 });
     43 
     44 </script>
     45 </pre>
     46 </body>
     47 </html>