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

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

Issue 1995333002: Handle newCursorPosition correctly for Android's commitText() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: For compile error. 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
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 daba680b7a4724ae155f8fbbbebd3beeb1c1ca97..9e82c399b64989e9d7228aea135d62aeee626ae5 100644
--- a/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
+++ b/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
@@ -195,7 +195,7 @@ TEST_F(InputMethodControllerTest, ConfirmPasswordComposition)
EXPECT_STREQ("foo", input->value().utf8().data());
}
-TEST_F(InputMethodControllerTest, SetCompositionForInputWithDifferentNewCursorPositions)
+TEST_F(InputMethodControllerTest, SetCompositionForInputWithNewCursorPositions)
{
HTMLInputElement* input = toHTMLInputElement(
insertHTMLElement("<input id='sample'>", "sample"));
@@ -252,7 +252,7 @@ TEST_F(InputMethodControllerTest, SetCompositionForInputWithDifferentNewCursorPo
EXPECT_EQ(7u, controller().getSelectionOffsets().end());
}
-TEST_F(InputMethodControllerTest, SetCompositionForContentEditableWithDifferentNewCursorPositions)
+TEST_F(InputMethodControllerTest, SetCompositionForContentEditableWithNewCursorPositions)
{
// There are 7 nodes and 5+1+5+1+3+4+3 characters: "hello", '\n', "world", "\n", "012", "3456", "789".
Element* div = insertHTMLElement(
@@ -405,7 +405,7 @@ TEST_F(InputMethodControllerTest, InsertLineBreakAfterConfirmingText)
"<div id='sample' contenteditable='true'></div>",
"sample");
- controller().confirmCompositionOrInsertText("hello", InputMethodController::ConfirmCompositionBehavior::KeepSelection);
+ controller().commitComposition("hello");
EXPECT_STREQ("hello", div->innerText().utf8().data());
controller().setEditableSelectionOffsets(PlainTextRange(2, 2));

Powered by Google App Engine
This is Rietveld 408576698