<!DOCTYPE html>
<body>
<script src="../../../../../resources/js-test.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 r = new Range();
//window.getSelection().addRange(r);
r.setStart(target, 0);
r.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>
</body>