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

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

Issue 2007213002: Fixing long press paste pop up bug (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nit pick Created 4 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 3019bcd4cbc645b56fa25c633cb3863fe2de906a..9ec6c0639a806cfbbee22e5265a81b67437fc492 100644
--- a/third_party/WebKit/Source/web/tests/WebViewTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
@@ -1687,6 +1687,26 @@ TEST_F(WebViewTest, LongPressLink)
EXPECT_EQ(WebInputEventResult::HandledSystem, webView->handleInputEvent(event));
}
+TEST_F(WebViewTest, LongPressEmptyEditableSelection)
+{
+ URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c_str()),
+ WebString::fromUTF8("long_press_empty_editable_selection.html"));
+
+ WebViewImpl* webView = m_webViewHelper.initializeAndLoad(
+ m_baseURL + "long_press_empty_editable_selection.html", true);
+ webView->resize(WebSize(500, 300));
+ webView->updateAllLifecyclePhases();
+ runPendingTasks();
+
+ WebGestureEvent event;
+ event.type = WebInputEvent::GestureLongPress;
+ event.sourceDevice = WebGestureDeviceTouchscreen;
+ event.x = 10;
+ event.y = 10;
+
+ EXPECT_EQ(WebInputEventResult::HandledSystem, webView->handleInputEvent(event));
+}
+
TEST_F(WebViewTest, LongPressSelection)
{
URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c_str()), WebString::fromUTF8("longpress_selection.html"));

Powered by Google App Engine
This is Rietveld 408576698