Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / parser / remove-current-node-parent-x.xhtml
blob38933f507edee78a6e4f284f2fbaf1208a71a5ce
1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <head>
3 </head>
4 <body>
5 <script>
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);
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.testRunner)
29 testRunner.notifyDone();
32 setTimeout(verify, 100);
33 </script>
34 <script>
35 alert("FAIL"); // Firefox compatibility.
36 </script>
37 <foo/>
38 </body>
39 </html>