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

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

Issue 1403893003: Plumb gesture source value through Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Convert more tests (related to CL) to use Touchscreen. Created 5 years, 2 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 a36d23449f195f904db8771cb9c6624b9381cc17..8cca6531a1469e13b2ef67cf6c09346946091a97 100644
--- a/third_party/WebKit/Source/web/tests/WebViewTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
@@ -1456,6 +1456,7 @@ static bool tapElementById(WebView* webView, WebInputEvent::Type type, const Web
WebGestureEvent event;
event.type = type;
+ event.sourceDevice = WebGestureDeviceTouchscreen;
event.x = center.x();
event.y = center.y();
@@ -1508,6 +1509,7 @@ TEST_F(WebViewTest, DetectContentAroundPosition)
// Tapping elsewhere should cancel the scheduled intent.
WebGestureEvent event;
event.type = WebInputEvent::GestureTap;
+ event.sourceDevice = WebGestureDeviceTouchscreen;
webView->handleInputEvent(event);
runPendingTasks();
EXPECT_TRUE(client.pendingIntentsCancelled());
@@ -1522,6 +1524,7 @@ TEST_F(WebViewTest, ClientTapHandling)
WebView* webView = m_webViewHelper.initializeAndLoad("about:blank", true, 0, &client);
WebGestureEvent event;
event.type = WebInputEvent::GestureTap;
+ event.sourceDevice = WebGestureDeviceTouchscreen;
event.x = 3;
event.y = 8;
webView->handleInputEvent(event);
@@ -1547,6 +1550,7 @@ TEST_F(WebViewTest, ClientTapHandlingNullWebViewClient)
webView->setMainFrame(localFrame);
WebGestureEvent event;
event.type = WebInputEvent::GestureTap;
+ event.sourceDevice = WebGestureDeviceTouchscreen;
event.x = 3;
event.y = 8;
EXPECT_FALSE(webView->handleInputEvent(event));
@@ -1640,6 +1644,7 @@ TEST_F(WebViewTest, ShowPressOnTransformedLink)
WebGestureEvent event;
event.type = WebInputEvent::GestureShowPress;
+ event.sourceDevice = WebGestureDeviceTouchscreen;
event.x = 20;
event.y = 20;
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp ('k') | third_party/WebKit/public/platform/WebGestureDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698