| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| </head> |
| <body> |
| <div> |
| <script> |
| if (window.layoutTestController) { |
| layoutTestController.dumpAsText(); |
| layoutTestController.waitUntilDone(); |
| } |
| |
| var div = document.getElementsByTagName('div')[0]; |
| div.parentNode.removeChild(div); |
| |
| function msg(text) |
| { |
| var n = document.createElement("p"); |
| n.appendChild(document.createTextNode(text)); |
| document.body.appendChild(n); |
| } |
| |
| function verify() |
| { |
| msg("Test for bug 30049: Manipulating DOM from a script while parsing XHTML can cause a crash."); |
| msg("Should say PASS:"); |
| // Even though a subtree is removed, parsing continues. |
| msg(div.getElementsByTagName("foo").length == 1 ? "PASS" : "FAIL"); |
| if (window.layoutTestController) |
| layoutTestController.notifyDone(); |
| } |
| |
| setTimeout(verify, 100); |
| </script> |
| <foo/> |
| <script> |
| alert("FAIL"); // Firefox compatibility. |
| </script> |
| </div> |
| </body> |
| </html> |