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

Unified Diff: third_party/WebKit/Source/core/exported/WebViewTest.cpp

Issue 2910223003: [refactor] - Rename and Move WebWidget::CaretOrSelectionRange to WebInputMethodController::GetSelec… (Closed)
Patch Set: Rebase Created 3 years, 5 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/exported/WebViewTest.cpp
diff --git a/third_party/WebKit/Source/core/exported/WebViewTest.cpp b/third_party/WebKit/Source/core/exported/WebViewTest.cpp
index 9d9f792507c3dfa40f8ee0b6acafa7e017b8c95c..774d078b24ac3dbc24c7565f794953c4db59f7c0 100644
--- a/third_party/WebKit/Source/core/exported/WebViewTest.cpp
+++ b/third_party/WebKit/Source/core/exported/WebViewTest.cpp
@@ -2411,7 +2411,9 @@ TEST_P(WebViewTest, LongPressImageTextarea) {
WebString image = WebString::FromUTF8("purpleimage");
EXPECT_TRUE(TapElementById(WebInputEvent::kGestureLongPress, image));
- WebRange range = web_view->CaretOrSelectionRange();
+ WebRange range = web_view->MainFrameImpl()
+ ->GetInputMethodController()
+ ->GetSelectionOffsets();
EXPECT_FALSE(range.IsNull());
EXPECT_EQ(0, range.StartOffset());
EXPECT_EQ(1, range.length());
@@ -2480,7 +2482,9 @@ TEST_P(WebViewTest, SelectionOnReadOnlyInput) {
WebLocalFrameBase* frame = web_view->MainFrameImpl();
EXPECT_EQ(test_word, std::string(frame->SelectionAsText().Utf8().data()));
- WebRange range = web_view->CaretOrSelectionRange();
+ WebRange range = web_view->MainFrameImpl()
+ ->GetInputMethodController()
+ ->GetSelectionOffsets();
EXPECT_FALSE(range.IsNull());
EXPECT_EQ(0, range.StartOffset());
EXPECT_EQ(static_cast<int>(test_word.length()), range.length());

Powered by Google App Engine
This is Rietveld 408576698