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

Unified Diff: LayoutTests/editing/text-iterator/script-tests/basic-iteration.js

Issue 12780019: Merge 145954 "TextIterator emits LF for a br element inside an e..." (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 years, 9 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
Index: LayoutTests/editing/text-iterator/script-tests/basic-iteration.js
===================================================================
--- LayoutTests/editing/text-iterator/script-tests/basic-iteration.js (revision 146097)
+++ LayoutTests/editing/text-iterator/script-tests/basic-iteration.js (working copy)
@@ -1,5 +1,16 @@
description('Unit tests for WebCore text iterator');
+function appendBrElement(node)
+{
+ node.appendChild(document.createElement('br'));
+}
+
+function addShadowTreeWithDivElement(node)
+{
+ node.webkitCreateShadowRoot();
+ internals.oldestShadowRoot(node).innerHTML = '<div>b</div>';
+}
+
var subframe = document.createElement('iframe');
document.body.appendChild(subframe);
@@ -31,6 +42,12 @@
shouldBe('range.selectNodeContents(testDocument.body); internals.rangeAsText(range)', '"hey"');
shouldBe('range.setStartBefore(testDocument.body); range.setEndAfter(testDocument.body); internals.rangeAsText(range)', '"hey"');
+testDocument.body.innerHTML = '<input id="a" value="b" />';
+var input = testDocument.querySelector('input');
+shouldBe('range.selectNodeContents(internals.oldestShadowRoot(input)); internals.rangeAsText(range)', '"b"');
+
+shouldBe('appendBrElement(internals.oldestShadowRoot(input).childNodes[0]); range.selectNodeContents(internals.oldestShadowRoot(input)); internals.rangeAsText(range)', '"b"');
+
document.body.removeChild(subframe);
var successfullyParsed = true;
« no previous file with comments | « LayoutTests/editing/text-iterator/basic-iteration-shadowdom-expected.txt ('k') | LayoutTests/platform/mac/TestExpectations » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698