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); |
sadrul
2016/01/29 16:30:43
Can you explain why this change was necessary?
Navid Zolghadr
2016/02/01 15:41:33
Without this it was failing in one of the ASSERTs.
sadrul
2016/02/01 16:07:08
Which one?
Navid Zolghadr
2016/02/01 16:21:30
The test was this one WebContentsViewAuraTest.Repe
sadrul
2016/02/01 16:46:40
Interesting. Should PlatformTouchPointBuilder take
Navid Zolghadr
2016/02/01 16:53:14
Not sure how you like PlatformTouchPointBuilder ta
sadrul
2016/02/01 17:06:34
I was thinking 0.5? Or is that not the default pre
Navid Zolghadr
2016/02/01 17:54:48
I believe Mustaq can give a better answer here but
|
callback.Run(ui::ET_GESTURE_SCROLL_END, gfx::Vector2dF()); |