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

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: 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
« no previous file with comments | « content/common/input/gesture_event_stream_validator.cc ('k') | content/public/test/render_view_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 60b8abb45b27b649a4230b20adc41c1360a12228..44647dfd45c40055e75c9c5d6a42a5d9c3c08093 100644
--- a/content/public/test/browser_test_utils.cc
+++ b/content/public/test/browser_test_utils.cc
@@ -471,12 +471,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();
@@ -487,6 +489,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);
@@ -495,6 +498,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;
@@ -508,6 +512,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;
« no previous file with comments | « content/common/input/gesture_event_stream_validator.cc ('k') | content/public/test/render_view_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698