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

Unified Diff: athena/home/home_card_gesture_manager_unittest.cc

Issue 581963004: Clean up GestureEventDetails constructors and fix unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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: athena/home/home_card_gesture_manager_unittest.cc
diff --git a/athena/home/home_card_gesture_manager_unittest.cc b/athena/home/home_card_gesture_manager_unittest.cc
index aea59b813cf4a7f8cc848829ef4d78d87fb13cf0..19fc17c6165605a72f793530969cb399c21a6b35 100644
--- a/athena/home/home_card_gesture_manager_unittest.cc
+++ b/athena/home/home_card_gesture_manager_unittest.cc
@@ -46,8 +46,13 @@ class HomeCardGestureManagerTest : public test::AthenaTestBase,
// Process a gesture event for our use case.
bool ProcessGestureEvent(ui::EventType type, int y) {
- ui::GestureEvent event(0, y, ui::EF_NONE, base::TimeDelta(),
- ui::GestureEventDetails(type, 0, (y - last_y_)));
+ ui::GestureEventDetails details;
+ if (type == ui::ET_GESTURE_SCROLL_BEGIN ||
+ type == ui::ET_GESTURE_SCROLL_UPDATE)
+ details = ui::GestureEventDetails(type, 0, (y - last_y_));
+ else
+ details = ui::GestureEventDetails(type);
+ ui::GestureEvent event(0, y, ui::EF_NONE, base::TimeDelta(), details);
if (type == ui::ET_GESTURE_SCROLL_BEGIN) {
// Compute the position that the home card would have wrt to the top of
// the screen if the screen had screen_bounds().

Powered by Google App Engine
This is Rietveld 408576698