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

Unified Diff: third_party/WebKit/Source/web/tests/WebViewTest.cpp

Issue 1995333002: Handle newCursorPosition correctly for Android's commitText() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync. Almost the same to the previous patch. 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/web/tests/WebViewTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebViewTest.cpp b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
index c542443721ecc9ea3c9f7e82fa981a181ebd2ffb..78f17e9e8eeca5f967bbcc9fc4b0b0195cdbc79f 100644
--- a/third_party/WebKit/Source/web/tests/WebViewTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
@@ -890,7 +890,7 @@ TEST_F(WebViewTest, InsertNewLinePlacementAfterConfirmComposition)
EXPECT_EQ(-1, info.compositionEnd);
std::string compositionText("\n");
- webView->confirmComposition(WebString::fromUTF8(compositionText.c_str()));
+ webView->confirmComposition(WebString::fromUTF8(compositionText.c_str()), 1);
info = webView->textInputInfo();
EXPECT_EQ(5, info.selectionStart);
EXPECT_EQ(5, info.selectionEnd);
@@ -950,7 +950,7 @@ TEST_F(WebViewTest, SetCompositionFromExistingTextInTextArea)
WebLocalFrameImpl* frame = webView->mainFrameImpl();
frame->setEditableSelectionOffsets(27, 27);
std::string newLineText("\n");
- webView->confirmComposition(WebString::fromUTF8(newLineText.c_str()));
+ webView->confirmComposition(WebString::fromUTF8(newLineText.c_str()), 1);
WebTextInputInfo info = webView->textInputInfo();
EXPECT_EQ("0123456789abcdefghijklmnopq\nrstuvwxyz", std::string(info.value.utf8().data()));
@@ -964,7 +964,7 @@ TEST_F(WebViewTest, SetCompositionFromExistingTextInTextArea)
EXPECT_EQ(34, info.compositionEnd);
std::string compositionText("yolo");
- webView->confirmComposition(WebString::fromUTF8(compositionText.c_str()));
+ webView->confirmComposition(WebString::fromUTF8(compositionText.c_str()), 1);
info = webView->textInputInfo();
EXPECT_EQ("0123456789abcdefghijklmnopq\nrsyoloxyz", std::string(info.value.utf8().data()));
EXPECT_EQ(34, info.selectionStart);
@@ -998,7 +998,7 @@ TEST_F(WebViewTest, SetEditableSelectionOffsetsKeepsComposition)
std::string compositionTextSecond("world");
WebVector<WebCompositionUnderline> emptyUnderlines;
- webView->confirmComposition(WebString::fromUTF8(compositionTextFirst.c_str()));
+ webView->confirmComposition(WebString::fromUTF8(compositionTextFirst.c_str()), 1);
webView->setComposition(WebString::fromUTF8(compositionTextSecond.c_str()), emptyUnderlines, 5, 5);
WebTextInputInfo info = webView->textInputInfo();
@@ -3209,7 +3209,7 @@ TEST_F(WebViewTest, PasswordFieldEditingIsUserGesture)
frame->setAutofillClient(&client);
webView->setInitialFocus(false);
- EXPECT_TRUE(webView->confirmComposition(WebString::fromUTF8(std::string("hello").c_str())));
+ EXPECT_TRUE(webView->confirmComposition(WebString::fromUTF8(std::string("hello").c_str()), 1));
EXPECT_EQ(1, client.textChangesFromUserGesture());
EXPECT_FALSE(UserGestureIndicator::processingUserGesture());
frame->setAutofillClient(0);

Powered by Google App Engine
This is Rietveld 408576698