chromium/third_party/blink/web_tests/fast/parser/remove-current-node-parent-x-2.xhtml

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