tor-browser

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

test_bug518104.html (1330B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=518104
      5 -->
      6 <head>
      7  <title>Test for Bug 518104</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=518104">Mozilla Bug 518104</a>
     13 <p id="display"></p>
     14 <script class="testbody" type="text/javascript">
     15 
     16 /** Test for Bug 518104 */
     17 // data: version at parser/htmlparser/tests/mochitest/test_bug1364399.html
     18 SimpleTest.waitForExplicitFinish();
     19 
     20 function done() {
     21  // document.write should have gotten ignored due to the
     22  // ignore-destructive-writes counter. Then document.close should
     23  // have gotten ignored due to the parser still being not-script-created.
     24  var iframe = document.getElementById("iframe");
     25  var divs = iframe.contentWindow.document.getElementsByTagName("div").length;
     26  is(divs, 2, "<div>s are still there.")
     27  var ps = iframe.contentWindow.document.getElementsByTagName("p").length;
     28  is(ps, 0, "<p> did not get written.")
     29  SimpleTest.finish();
     30 }
     31 
     32 </script>
     33 <div id="content" style="display: none">
     34  <iframe id='iframe' srcdoc="<div></div><div></div><script defer src='file_bug518104.js'></script>">
     35  </iframe>
     36 </div>
     37 <pre id="test">
     38 </pre>
     39 </body>
     40 </html>