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

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: change for aelias@'s review 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..32e4ca7086d2b66bd4eabce4b99ff88c922d8e3d 100644
--- a/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
+++ b/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
@@ -120,7 +120,7 @@ TEST_F(InputMethodControllerTest, SelectionOnConfirmExistingText)
underlines.append(CompositionUnderline(0, 5, Color(255, 0, 0), false, 0));
controller().setCompositionFromExistingText(underlines, 0, 5);
- controller().confirmComposition();
+ controller().replaceComposition();
EXPECT_EQ(0, frame().selection().start().computeOffsetInContainerNode());
EXPECT_EQ(0, frame().selection().end().computeOffsetInContainerNode());
}
@@ -190,7 +190,7 @@ TEST_F(InputMethodControllerTest, ConfirmPasswordComposition)
Vector<CompositionUnderline> underlines;
underlines.append(CompositionUnderline(0, 5, Color(255, 0, 0), false, 0));
controller().setComposition("foo", underlines, 0, 3);
- controller().confirmComposition();
+ controller().replaceComposition();
EXPECT_STREQ("foo", input->value().utf8().data());
}
@@ -405,7 +405,7 @@ TEST_F(InputMethodControllerTest, InsertLineBreakAfterConfirmingText)
"<div id='sample' contenteditable='true'></div>",
"sample");
- controller().confirmCompositionOrInsertText("hello", InputMethodController::ConfirmCompositionBehavior::KeepSelection);
+ controller().confirmComposition("hello");
EXPECT_STREQ("hello", div->innerText().utf8().data());
controller().setEditableSelectionOffsets(PlainTextRange(2, 2));
@@ -444,7 +444,7 @@ TEST_F(InputMethodControllerTest, CompositionInputEventIsComposing)
EXPECT_STREQ("beforeinput.isComposing:true;input.isComposing:true;", document().title().utf8().data());
document().setTitle(emptyString());
- controller().confirmComposition();
+ controller().replaceComposition();
// Last pair of InputEvent should also be inside composition scope.
EXPECT_STREQ("beforeinput.isComposing:true;input.isComposing:true;", document().title().utf8().data());
}
@@ -479,7 +479,7 @@ TEST_F(InputMethodControllerTest, CompositionInputEventData)
EXPECT_STREQ("beforeinput.data:ni;input.data:ni;", document().title().utf8().data());
document().setTitle(emptyString());
- controller().confirmComposition();
+ controller().replaceComposition();
EXPECT_STREQ("beforeinput.data:ni;input.data:ni;", document().title().utf8().data());
}

Powered by Google App Engine
This is Rietveld 408576698