|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=405182 |
|
5 --> |
|
6 <head> |
|
7 <title>Test for Bug 405182</title> |
|
8 <script type="text/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=405182">Mozilla Bug 405182</a> |
|
13 <p id="display"></p> |
|
14 <div id="content" style="display: none"> |
|
15 |
|
16 </div> |
|
17 <pre id="test"> |
|
18 <script class="testbody" type="text/javascript"> |
|
19 |
|
20 /** Test for Bug 405182 **/ |
|
21 |
|
22 function do_test() |
|
23 { |
|
24 var dE = document.documentElement; |
|
25 |
|
26 document.addEventListener("DOMNodeRemoved", newScript, false); |
|
27 |
|
28 document.removeChild(dE); |
|
29 |
|
30 function newScript() |
|
31 { |
|
32 var ns = document.createElementNS("http://www.w3.org/1999/xhtml", "script"); |
|
33 var nt = document.createTextNode("42;"); |
|
34 ns.appendChild(nt); |
|
35 dE.appendChild(ns); |
|
36 ok(true, "Test is successful if we get here without crashing"); |
|
37 SimpleTest.finish(); |
|
38 } |
|
39 } |
|
40 |
|
41 SimpleTest.waitForExplicitFinish(); |
|
42 addLoadEvent(do_test); |
|
43 |
|
44 </script> |
|
45 </pre> |
|
46 </body> |
|
47 </html> |