<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>
