3 <p>This test verifies that a mutation event that removes inserted nodes from the
4 document doesn't crash upon the insertion of a new node into the document.
</p>
5 <p>PASS: You didn't crash.
</p>
7 <script id=
"dummy"></script>
10 if (window
.testRunner
)
11 testRunner
.dumpAsText();
13 function mutationListener(event
)
15 var element
= event
.srcElement
;
16 element
.parentNode
.removeChild(element
);
19 document
.body
.addEventListener("DOMNodeInserted", mutationListener
, false);
22 document
.body
.appendChild(document
.createElement("script"));
25 document
.body
.insertBefore(document
.createElement("script"), document
.getElementById("dummy"));
28 document
.body
.replaceChild(document
.createElement("script"), document
.getElementById("dummy"));
30 /* Parser-inserted nodes don't fire mutation events. */