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

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

Issue 2370663002: Remove logic to reset input method more than needed (Closed)
Patch Set: fixed handle issue in another CL Created 3 years, 10 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/web/ChromeClientImpl.cpp ('k') | third_party/WebKit/public/web/WebViewClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 90e46ac043b3945c2aab073634f9000888299cdc..3b9061c274774165de769be2c1242dae7fdacd7f 100644
--- a/third_party/WebKit/Source/web/tests/WebViewTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
@@ -1550,8 +1550,9 @@ TEST_P(WebViewTest, SetEditableSelectionOffsetsKeepsComposition) {
EXPECT_EQ("hello world", std::string(info.value.utf8().data()));
EXPECT_EQ(2, info.selectionStart);
EXPECT_EQ(2, info.selectionEnd);
- EXPECT_EQ(-1, info.compositionStart);
- EXPECT_EQ(-1, info.compositionEnd);
+ // Composition range should be reset by browser process or keyboard apps.
+ EXPECT_EQ(6, info.compositionStart);
+ EXPECT_EQ(11, info.compositionEnd);
}
TEST_P(WebViewTest, IsSelectionAnchorFirst) {
@@ -2365,11 +2366,13 @@ TEST_P(WebViewTest, FinishComposingTextDoesNotDismissHandles) {
EXPECT_TRUE(frame->frame()->inputMethodController().hasComposition());
EXPECT_EQ("", std::string(frame->selectionAsText().utf8().data()));
EXPECT_FALSE(frame->frame()->selection().isHandleVisible());
+ EXPECT_TRUE(frame->frame()->inputMethodController().hasComposition());
EXPECT_TRUE(tapElementById(WebInputEvent::GestureLongPress, target));
EXPECT_EQ("testword12345",
std::string(frame->selectionAsText().utf8().data()));
EXPECT_TRUE(frame->frame()->selection().isHandleVisible());
+ EXPECT_TRUE(frame->frame()->inputMethodController().hasComposition());
// Check that finishComposingText(KeepSelection) does not dismiss handles.
activeInputMethodController->finishComposingText(
« no previous file with comments | « third_party/WebKit/Source/web/ChromeClientImpl.cpp ('k') | third_party/WebKit/public/web/WebViewClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698