Chromium Code Reviews| Index: ui/events/test/motion_event_test_utils.cc |
| diff --git a/ui/events/test/motion_event_test_utils.cc b/ui/events/test/motion_event_test_utils.cc |
| index ec052913d1e26f60013330464186868e18415a4d..1bc5dbe229654697073d0eadce1733a3919b3a5b 100644 |
| --- a/ui/events/test/motion_event_test_utils.cc |
| +++ b/ui/events/test/motion_event_test_utils.cc |
| @@ -130,6 +130,17 @@ MockMotionEvent& MockMotionEvent::ReleasePoint() { |
| return *this; |
| } |
| +MockMotionEvent& MockMotionEvent::ReleasePointAt(size_t index) { |
|
tdresser
2016/07/22 15:57:45
ReleasePointAtIndex?
It's a bit confusing that we
sahel
2016/07/22 19:46:42
Done.
|
| + DCHECK_LT(index, GetPointerCount()); |
| + if (index == GetPointerCount() - 1) |
| + return ReleasePoint(); |
| + set_unique_event_id(ui::GetNextTouchEventId()); |
| + RemovePointerAt(index); |
| + set_action_index(index); |
| + set_action(ACTION_POINTER_UP); |
| + return *this; |
| +} |
| + |
| MockMotionEvent& MockMotionEvent::CancelPoint() { |
| UpdatePointersAndID(); |
| DCHECK_GT(GetPointerCount(), 0U); |