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

Unified Diff: third_party/WebKit/Source/core/html/HTMLTextFormControlElementTest.cpp

Issue 2278373002: Fix selectionEnd value in a case of dragging out from an INPUT element. (Closed)
Patch Set: Created 4 years, 4 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/html/HTMLTextFormControlElement.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/html/HTMLTextFormControlElementTest.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLTextFormControlElementTest.cpp b/third_party/WebKit/Source/core/html/HTMLTextFormControlElementTest.cpp
index 2ec394fd99798ba5c061762516569f651c4ba49d..48f07fa55773df93870a561f04d6a8a3cd3fabdf 100644
--- a/third_party/WebKit/Source/core/html/HTMLTextFormControlElementTest.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLTextFormControlElementTest.cpp
@@ -215,4 +215,12 @@ TEST_F(HTMLTextFormControlElementTest, SpellCheckDoesNotCauseUpdateLayout)
EXPECT_EQ(startCount, layoutCount());
}
+TEST_F(HTMLTextFormControlElementTest, IndexForPosition)
+{
+ HTMLInputElement* input = toHTMLInputElement(document().getElementById("input"));
+ input->setValue("Hello");
+ HTMLElement* innerEditor = input->innerEditorElement();
+ EXPECT_EQ(5, HTMLTextFormControlElement::indexForPosition(innerEditor, Position(innerEditor, PositionAnchorType::AfterAnchor)));
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698