|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=691215 |
|
5 --> |
|
6 <head> |
|
7 <title>Test for Bug 691215</title> |
|
8 <script type="application/javascript" 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=691215">Mozilla Bug 691215</a> |
|
13 <p id="display"></p> |
|
14 <div id="content" style="display: none"> |
|
15 |
|
16 </div> |
|
17 <pre id="test"> |
|
18 <script type="application/javascript"> |
|
19 |
|
20 /** Test for Bug 691215 **/ |
|
21 |
|
22 SimpleTest.waitForExplicitFinish(); |
|
23 |
|
24 var url = "data:text/xml,<root/>"; |
|
25 var w; |
|
26 |
|
27 addLoadEvent(function() { |
|
28 // Need a separate window because we do not prettyprint in iframes. This is |
|
29 // why this test can't be a crashtest. |
|
30 w = window.open(url); |
|
31 // Need to poll for load completion, sadly |
|
32 setTimeout(checker, 0); |
|
33 }); |
|
34 |
|
35 function checker() { |
|
36 if (w.location.href != url || |
|
37 w.document.readyState != "complete") { |
|
38 setTimeout(checker, 0); |
|
39 return; |
|
40 } |
|
41 var doc = w.document; |
|
42 var n = doc.createElement("span"); |
|
43 doc.replaceChild(n, doc.documentElement); |
|
44 w.close(); |
|
45 ok(1, "Hey, we got here, that's good"); |
|
46 SimpleTest.finish(); |
|
47 } |
|
48 |
|
49 </script> |
|
50 </pre> |
|
51 </body> |
|
52 </html> |