content/base/test/test_bug419132.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial