test_bug691215.html (1291B)
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 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 BASE_URI = "http://mochi.test:8888/tests/dom/xml/test/"; 25 var url = BASE_URI + "file_bug691215.xml"; 26 var w; 27 28 addLoadEvent(function() { 29 // Need a separate window because we do not prettyprint in iframes. This is 30 // why this test can't be a crashtest. 31 w = window.open(url); 32 // Need to poll for load completion, sadly 33 setTimeout(checker, 0); 34 }); 35 36 function checker() { 37 if (w.location.href != url || 38 w.document.readyState != "complete") { 39 setTimeout(checker, 0); 40 return; 41 } 42 var doc = w.document; 43 var n = doc.createElement("span"); 44 doc.replaceChild(n, doc.documentElement); 45 w.close(); 46 ok(1, "Hey, we got here, that's good"); 47 SimpleTest.finish(); 48 } 49 50 </script> 51 </pre> 52 </body> 53 </html>