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

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

Issue 2175803002: The helper functions for slop region check and subtraction are modified. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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);

Powered by Google App Engine
This is Rietveld 408576698