<body>

<p>This test verifies that a mutation event that removes inserted nodes from the 
document doesn't crash upon the insertion of a new node into the document.</p>
<p>PASS: You didn't crash.</p>

<script id="dummy"></script>

<script>
if (window.layoutTestController)
    layoutTestController.dumpAsText();

function mutationListener(event)
{
    var element = event.srcElement;
    element.parentNode.removeChild(element);
}

document.body.addEventListener("DOMNodeInserted", mutationListener, false);

/* appendChild */
document.body.appendChild(document.createElement("script"));

/* insertBefore */
document.body.insertBefore(document.createElement("script"), document.getElementById("dummy"));

/* replaceChild */
document.body.replaceChild(document.createElement("script"), document.getElementById("dummy"));

/* Parser-inserted nodes don't fire mutation events. */
</script>

</body>
