content/html/document/test/test_bug57600.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/html/document/test/test_bug57600.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,42 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=57600
     1.8 +-->
     1.9 +<head>
    1.10 +  <title>Test for Bug 57600</title>
    1.11 +  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.12 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    1.13 +</head>
    1.14 +<body>
    1.15 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=57600">Mozilla Bug 57600</a>
    1.16 +<div id="content" style="display: none">
    1.17 +  
    1.18 +</div>
    1.19 +<pre id="test">
    1.20 +<script type="application/javascript">
    1.21 +
    1.22 +/** Test for Bug 57600 **/
    1.23 +SimpleTest.waitForExplicitFinish();
    1.24 +var count = 0;
    1.25 +function disp(win) {
    1.26 +  var d = win ? win.document : self.testname.document;
    1.27 +  var str = 'You should see this';
    1.28 +  d.open();
    1.29 +  d.write(str);
    1.30 +  d.close();
    1.31 +  is(d.documentElement.textContent, str, "Unexpected text");
    1.32 +  if (++count == 2) {
    1.33 +    SimpleTest.finish();
    1.34 +  }
    1.35 +}
    1.36 +</script>
    1.37 +</pre>
    1.38 +<p id="display">
    1.39 +  <iframe src="javascript:'<body onload=&quot;this.onerror = parent.onerror; parent.disp(self)&quot;></body>'"> 
    1.40 +  </iframe>
    1.41 +  <iframe name="testname" src="javascript:'<body onload=&quot;this.onerror = parent.onerror; parent.disp()&quot;></body>'"> 
    1.42 +  </iframe>
    1.43 +</p>
    1.44 +</body>
    1.45 +</html>

mercurial