content/base/test/test_bug518104.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/base/test/test_bug518104.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,37 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=518104
     1.8 +-->
     1.9 +<head>
    1.10 +  <title>Test for Bug 518104</title>
    1.11 +  <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
    1.12 +  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.13 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    1.14 +</head>
    1.15 +<body>
    1.16 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=518104">Mozilla Bug 518104</a>
    1.17 +<p id="display"></p>
    1.18 +<script class="testbody" type="text/javascript">
    1.19 +
    1.20 +/** Test for Bug 518104 **/
    1.21 +SimpleTest.waitForExplicitFinish();
    1.22 +
    1.23 +function done() {
    1.24 +  var iframe = document.getElementById("iframe");
    1.25 +  var divs = iframe.contentWindow.document.getElementsByTagName("p").length;
    1.26 +  is(divs, 0, "<p> got written.")
    1.27 +  SimpleTest.finish();
    1.28 +}
    1.29 +
    1.30 +</script>
    1.31 +<div id="content" style="display: none">
    1.32 +  <iframe id='iframe' src="data:text/html,
    1.33 +    <div></div><div></div>
    1.34 +    <script defer src='data:application/javascript,document.write(%2522<p></p>%2522);parent.done();document.close();'></script>">
    1.35 +  </iframe>
    1.36 +</div>
    1.37 +<pre id="test">
    1.38 +</pre>
    1.39 +</body>
    1.40 +</html>

mercurial