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

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: Add GestureEventStreamValidator source device compatibility check. 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..57fd5bf12a5b513e3b90d4341b490aa986227714 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 = WebGestureDeviceTouchpad;
Rick Byers 2015/10/19 18:20:29 tap should always be touchscreen
wjmaclean 2015/10/19 18:58:49 Done.
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 = WebGestureDeviceTouchpad;
Rick Byers 2015/10/19 18:20:29 ditto
wjmaclean 2015/10/19 18:58:49 Done.
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 = WebGestureDeviceTouchpad;
Rick Byers 2015/10/19 18:20:29 ditto
wjmaclean 2015/10/19 18:58:49 Done.
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 = WebGestureDeviceTouchpad;
Rick Byers 2015/10/19 18:20:29 ditto
wjmaclean 2015/10/19 18:58:49 Done.
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 = WebGestureDeviceTouchpad;
Rick Byers 2015/10/19 18:20:29 ditto
wjmaclean 2015/10/19 18:58:49 Done.
event.x = 20;
event.y = 20;

Powered by Google App Engine
This is Rietveld 408576698