| <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> |
| function mutationListener(event) |
| var element = event.srcElement; |
| element.parentNode.removeChild(element); |
| document.body.addEventListener("DOMNodeInserted", mutationListener, false); |
| document.body.appendChild(document.createElement("script")); |
| document.body.insertBefore(document.createElement("script"), document.getElementById("dummy")); |
| document.body.replaceChild(document.createElement("script"), document.getElementById("dummy")); |
| /* Parser-inserted nodes don't fire mutation events. */ |