Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Unified Diff: LayoutTests/fast/dom/Range/split-text-in-range.html

Issue 14629026: Fix an assertion failure in Range::textNodeSplit by Text::splitText. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Range/split-text-in-range-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Range/split-text-in-range-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698