Rubber-stamped by Brady Eidson.
[webbrowser.git] / LayoutTests / fast / parser / remove-current-node-parent-x.xhtml
blob6bf8328af3fdc633ae95272661604fb818a86957
1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <head>
3 </head>
4 <body>
5 <script>
6 if (window.layoutTestController) {
7 layoutTestController.dumpAsText();
8 layoutTestController.waitUntilDone();
11 var body = document.getElementsByTagName('body')[0];
12 var newBody = document.createElement("body");
13 body.parentNode.replaceChild(newBody, body);
15 function msg(text)
17 var n = document.createElement("p");
18 n.appendChild(document.createTextNode(text));
19 document.body.appendChild(n);
22 function verify()
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.layoutTestController)
29 layoutTestController.notifyDone();
32 setTimeout(verify, 100);
33 </script>
34 <script>
35 alert("FAIL"); // Firefox compatibility.
36 </script>
37 <foo/>
38 </body>
39 </html>