blob: 6bf8328af3fdc633ae95272661604fb818a86957 [file] [log] [blame]
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
var body = document.getElementsByTagName('body')[0];
var newBody = document.createElement("body");
body.parentNode.replaceChild(newBody, body);
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(body.getElementsByTagName("foo").length == 1 ? "PASS" : "FAIL");
if (window.layoutTestController)
layoutTestController.notifyDone();
}
setTimeout(verify, 100);
</script>
<script>
alert("FAIL"); // Firefox compatibility.
</script>
<foo/>
</body>
</html>