| <!DOCTYPE html> |
| <body> |
| <script src="../../../resources/js-test-pre.js"></script> |
| <div id="parent1">text</div> |
| <script> |
| var parent = document.getElementById('parent1'); |
| var target = parent.firstChild; |
| |
| function handleInsertion() { |
| document.removeEventListener('DOMNodeInserted', handleInsertion); |
| target.nextSibling.remove(); |
| } |
| |
| document.addEventListener('DOMNodeInserted', handleInsertion, false); |
| var range = document.createRange(); |
| range.setStart(target, 0); |
| range.setEnd(target, 4); |
| target.splitText(2); |
| description('No assertion failures even if an DOM mutation event handler updates the new node created by Text::splitText.'); |
| testPassed(' if the test wasn\'t terminated by an assertion.'); |
| parent.remove(); |
| </script> |
| <script src="../../../resources/js-test-post.js"></script> |
| </body> |