Chromium Code Reviews| Index: ui/events/gesture_detection/mock_motion_event.cc |
| diff --git a/ui/events/gesture_detection/mock_motion_event.cc b/ui/events/gesture_detection/mock_motion_event.cc |
| index 26d884f90e9d480666278a63c90bd4e481c6fb4f..6e4e9db0114c534d4a51260debd4efa1bd58b59c 100644 |
| --- a/ui/events/gesture_detection/mock_motion_event.cc |
| +++ b/ui/events/gesture_detection/mock_motion_event.cc |
| @@ -49,13 +49,30 @@ MockMotionEvent::MockMotionEvent(Action action, |
| points[2].SetPoint(x2, y2); |
| } |
| +MockMotionEvent::MockMotionEvent(Action action, |
| + TimeTicks time, |
| + float x0, |
| + float y0, |
| + float x1, |
| + float y1, |
| + float x2, |
| + float y2, |
| + float x3, |
| + float y3) |
| + : action(action), pointer_count(4), time(time), id(0) { |
| + points[0].SetPoint(x0, y0); |
| + points[1].SetPoint(x1, y1); |
| + points[2].SetPoint(x2, y2); |
| + points[2].SetPoint(x3, y3); |
| +} |
| + |
| MockMotionEvent::MockMotionEvent(const MockMotionEvent& other) |
| : action(other.action), |
| pointer_count(other.pointer_count), |
| time(other.time), |
| id(other.GetId()) { |
| - points[0] = other.points[0]; |
| - points[1] = other.points[1]; |
| + for (size_t i = 0; i < pointer_count; ++i) |
|
jdduke (slow)
2014/05/28 16:26:00
Ooph, good catch...
|
| + points[i] = other.points[i]; |
| } |
| MockMotionEvent::~MockMotionEvent() {} |