tor-browser

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

test_bug893537.html (1192B)


      1 <!doctype html>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=893537
      5 -->
      6    <head>
      7 <title>Test for crash caused by unloading and reloading srcdoc iframes</title>
      8 <script src="/tests/SimpleTest/SimpleTest.js"></script>
      9 <link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
     10 </head>
     11 <body>
     12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=893537">Mozilla Bug 893537</a>
     13 
     14 <iframe id="pframe" src="file_bug893537.html"></iframe>
     15 
     16 <pre id="test">
     17 <script>
     18  <!-- Bug 895303 -->
     19  SimpleTest.expectAssertions(0, 1);
     20 
     21  SimpleTest.waitForExplicitFinish();
     22  var pframe = $("pframe");
     23  
     24  var loadState = 1;
     25  pframe.contentWindow.addEventListener("load", function () {
     26 
     27    if (loadState == 1) {
     28      var iframe = pframe.contentDocument.getElementById("iframe");
     29      iframe.removeAttribute("srcdoc");
     30      loadState = 2;
     31    }
     32    if (loadState == 2) {
     33      SimpleTest.executeSoon(function () { pframe.contentWindow.location.reload() });
     34      loadState = 3;
     35    }
     36    if (loadState == 3) {
     37      ok(true, "This is a mochitest implementation of a crashtest.  To finish is to pass");
     38      SimpleTest.finish();
     39    }
     40  });
     41 
     42 </script>
     43 </pre>
     44 </body>
     45 </html>