blob: 8e60898de878502ed2e79d8b94256c20416e3863 [file] [log] [blame]
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<div>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.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.testRunner)
testRunner.notifyDone();
}
setTimeout(verify, 100);
</script>
<foo/>
<script>
alert("FAIL"); // Firefox compatibility.
</script>
</div>
</body>
</html>