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

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

Issue 2834343002: Make InputMethodController::TextInputType() to use canonicalized position (Closed)
Patch Set: 2017-04-24T15:09:42 Created 3 years, 8 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/InputMethodController.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/InputMethodControllerTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp b/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
index 7fd6d56e8d3aa4bad2047593616a2c9cde59ab99..e318758fc80e2fb259991beb16498603caa9cda1 100644
--- a/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
+++ b/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
@@ -1964,4 +1964,18 @@ TEST_F(InputMethodControllerTest, Marker_InsertBetweenMarkers) {
EXPECT_EQ(25u, GetDocument().Markers().Markers()[2]->EndOffset());
}
+// For http://crbug.com/712761
+TEST_F(InputMethodControllerTest, TextInputTypeAtBeforeEditable) {
+ GetDocument().body()->setContentEditable("true", ASSERT_NO_EXCEPTION);
+ GetDocument().body()->focus();
+
+ // Set selection before BODY(editable).
+ GetFrame().Selection().SetSelection(
+ SelectionInDOMTree::Builder()
+ .Collapse(Position(GetDocument().documentElement(), 0))
+ .Build());
+
+ EXPECT_EQ(kWebTextInputTypeContentEditable, Controller().TextInputType());
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/editing/InputMethodController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698