1 <html xmlns=
"http://www.w3.org/1999/xhtml">
6 if (window
.testRunner
) {
7 testRunner
.dumpAsText();
8 testRunner
.waitUntilDone();
11 var body
= document
.getElementsByTagName('body')[0];
12 var newBody
= document
.createElement("body");
13 body
.parentNode
.replaceChild(newBody
, body
);
17 var n
= document
.createElement("p");
18 n
.appendChild(document
.createTextNode(text
));
19 document
.body
.appendChild(n
);
24 msg("Test for bug 30049: Manipulating DOM from a script while parsing XHTML can cause a crash.");
25 msg("Should say PASS:");
26 // Even though a subtree is removed, parsing continues.
27 msg(body
.getElementsByTagName("foo").length
== 1 ? "PASS" : "FAIL");
28 if (window
.testRunner
)
29 testRunner
.notifyDone();
32 setTimeout(verify
, 100);
35 alert("FAIL"); // Firefox compatibility.