Index: LayoutTests/fast/dom/Range/split-text-in-range.html |
diff --git a/LayoutTests/fast/dom/Range/split-text-in-range.html b/LayoutTests/fast/dom/Range/split-text-in-range.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9b206c197dfaa8147dfe1259438bed3f96e269a0 |
--- /dev/null |
+++ b/LayoutTests/fast/dom/Range/split-text-in-range.html |
@@ -0,0 +1,25 @@ |
+<!DOCTYPE html> |
+<body> |
+<script src="../../js/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 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> |
+<script src="../../js/resources/js-test-post.js"></script> |
+</body> |