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

Unified Diff: ui/events/test/event_generator.cc

Issue 1617863002: Set the correct pressure for pointer events based on force (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Applying comments Created 4 years, 11 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 | « ui/events/event_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/test/event_generator.cc
diff --git a/ui/events/test/event_generator.cc b/ui/events/test/event_generator.cc
index 37e0a9bd8551695d2402e1b50cb892f4dadb8d48..425088e9cb80d9bf4e3efa3314b43bbf8c49db01 100644
--- a/ui/events/test/event_generator.cc
+++ b/ui/events/test/event_generator.cc
@@ -370,7 +370,8 @@ void EventGenerator::GestureScrollSequenceWithCallback(
const ScrollStepCallback& callback) {
const int kTouchId = 5;
base::TimeDelta timestamp = Now();
- ui::TouchEvent press(ui::ET_TOUCH_PRESSED, start, kTouchId, timestamp);
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED, start, 0, kTouchId,
+ timestamp, 5.0f, 5.0f, 0.0f, 1.0f);
Dispatch(&press);
callback.Run(ui::ET_GESTURE_SCROLL_BEGIN, gfx::Vector2dF());
@@ -381,14 +382,16 @@ void EventGenerator::GestureScrollSequenceWithCallback(
for (int i = 0; i < steps; ++i) {
location.Offset(dx, dy);
timestamp += step_delay;
- ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(), kTouchId, timestamp);
+ ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(), 0, kTouchId,
+ timestamp, 5.0f, 5.0f, 0.0f, 1.0f);
move.set_location_f(location);
move.set_root_location_f(location);
Dispatch(&move);
callback.Run(ui::ET_GESTURE_SCROLL_UPDATE, gfx::Vector2dF(dx, dy));
}
- ui::TouchEvent release(ui::ET_TOUCH_RELEASED, end, kTouchId, timestamp);
+ ui::TouchEvent release(ui::ET_TOUCH_RELEASED, end, 0, kTouchId,
+ timestamp, 5.0f, 5.0f, 0.0f, 1.0f);
Dispatch(&release);
callback.Run(ui::ET_GESTURE_SCROLL_END, gfx::Vector2dF());
« no previous file with comments | « ui/events/event_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698