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

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

Issue 2910223003: [refactor] - Rename and Move WebWidget::CaretOrSelectionRange to WebInputMethodController::GetSelec… (Closed)
Patch Set: Fixed some comments Created 3 years, 7 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 7f4f3c7952fd4af5ca71aa39109c91397a17e89f..f77b57d001d236053f1b88b1f48a7457b566ac09 100644
--- a/third_party/WebKit/Source/web/tests/WebViewTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
@@ -2408,7 +2408,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());
@@ -2477,7 +2479,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