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

Unified Diff: content/public/test/browser_test_utils.cc

Issue 1403893003: Plumb gesture source value through Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make compilers happy. 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: content/public/test/browser_test_utils.cc
diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc
index fdf58cc7ef5d17e3ce099da05dcf847570564563..5929170d7d1c226d0790dd403d53b65a003c8f87 100644
--- a/content/public/test/browser_test_utils.cc
+++ b/content/public/test/browser_test_utils.cc
@@ -468,12 +468,14 @@ void SimulateGestureScrollSequence(WebContents* web_contents,
blink::WebGestureEvent scroll_begin;
scroll_begin.type = blink::WebGestureEvent::GestureScrollBegin;
+ scroll_begin.sourceDevice = blink::WebGestureDeviceTouchpad;
scroll_begin.x = point.x();
scroll_begin.y = point.y();
widget_host->ForwardGestureEvent(scroll_begin);
blink::WebGestureEvent scroll_update;
scroll_update.type = blink::WebGestureEvent::GestureScrollUpdate;
+ scroll_update.sourceDevice = blink::WebGestureDeviceTouchpad;
scroll_update.x = point.x();
scroll_update.y = point.y();
scroll_update.data.scrollUpdate.deltaX = delta.x();
@@ -484,6 +486,7 @@ void SimulateGestureScrollSequence(WebContents* web_contents,
blink::WebGestureEvent scroll_end;
scroll_end.type = blink::WebGestureEvent::GestureScrollEnd;
+ scroll_end.sourceDevice = blink::WebGestureDeviceTouchpad;
scroll_end.x = point.x() + delta.x();
scroll_end.y = point.y() + delta.y();
widget_host->ForwardGestureEvent(scroll_end);
@@ -492,6 +495,7 @@ void SimulateGestureScrollSequence(WebContents* web_contents,
void SimulateTapAt(WebContents* web_contents, const gfx::Point& point) {
blink::WebGestureEvent tap;
tap.type = blink::WebGestureEvent::GestureTap;
+ tap.sourceDevice = blink::WebGestureDeviceTouchpad;
tap.x = point.x();
tap.y = point.y();
tap.modifiers = blink::WebInputEvent::ControlKey;
@@ -505,6 +509,7 @@ void SimulateTapWithModifiersAt(WebContents* web_contents,
const gfx::Point& point) {
blink::WebGestureEvent tap;
tap.type = blink::WebGestureEvent::GestureTap;
+ tap.sourceDevice = blink::WebGestureDeviceTouchpad;
tap.x = point.x();
tap.y = point.y();
tap.modifiers = modifiers;

Powered by Google App Engine
This is Rietveld 408576698