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

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

Issue 1668453002: Make empty selection behavior behave like Android EditText. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile error in WebViewTest Created 4 years, 11 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 e91eee8f9885e38fb5e7234c829d9f463453fbdb..53211c2ada6419e0b533de78438859670e76f6aa 100644
--- a/third_party/WebKit/Source/web/tests/WebViewTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
@@ -1608,11 +1608,14 @@ TEST_F(WebViewTest, LongPressSelection)
runPendingTasks();
WebString target = WebString::fromUTF8("target");
+ WebString blanklinestextbox = WebString::fromUTF8("blanklinestextbox");
WebString onselectstartfalse = WebString::fromUTF8("onselectstartfalse");
WebLocalFrameImpl* frame = toWebLocalFrameImpl(webView->mainFrame());
EXPECT_TRUE(tapElementById(webView, WebInputEvent::GestureLongPress, onselectstartfalse));
EXPECT_EQ("", std::string(frame->selectionAsText().utf8().data()));
+ EXPECT_TRUE(tapElementById(webView, WebInputEvent::GestureLongPress, blanklinestextbox));
+ EXPECT_EQ("", std::string(frame->selectionAsText().utf8().data()));
EXPECT_TRUE(tapElementById(webView, WebInputEvent::GestureLongPress, target));
EXPECT_EQ("testword", std::string(frame->selectionAsText().utf8().data()));
}

Powered by Google App Engine
This is Rietveld 408576698