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

Unified Diff: third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp

Issue 2720593005: Make PositionIterator to skip contents of INPUT/SELECT/TEXTAREA (Closed)
Patch Set: 2017-03-02T19:03:48 Add FrameSelectionTest.SelectAllWithInputElement Created 3 years, 10 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 | « third_party/WebKit/Source/core/editing/VisibleUnits.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp b/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp
index ee051fb97d1c336feedf533cf1d0a40d5cffca12..93c9e3b3b4ce83c460d0ee7a2d0bbf914f48f061 100644
--- a/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp
+++ b/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp
@@ -235,6 +235,20 @@ TEST_F(VisibleUnitsTest, canonicalPositionOfWithHTMLHtmlElement) {
canonicalPositionOf(Position(two, 1)));
}
+// For http://crbug.com/695317
+TEST_F(VisibleUnitsTest, canonicalPositionOfWithInputElement) {
+ setBodyContent("<input>123");
+ Element* const input = document().querySelector("input");
+
+ EXPECT_EQ(Position::beforeNode(input),
+ canonicalPositionOf(
+ Position::firstPositionInNode(document().documentElement())));
+
+ EXPECT_EQ(PositionInFlatTree::beforeNode(input),
+ canonicalPositionOf(PositionInFlatTree::firstPositionInNode(
+ document().documentElement())));
+}
+
TEST_F(VisibleUnitsTest, characterBefore) {
const char* bodyContent =
"<p id=host><b id=one>1</b><b id=two>22</b></p><b id=three>333</b>";
« no previous file with comments | « third_party/WebKit/Source/core/editing/VisibleUnits.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698