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

Unified Diff: athena/home/home_card_gesture_manager_unittest.cc

Issue 507653005: Fixes the fling and closest state logic in HomeCardGestureManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « athena/home/home_card_gesture_manager.cc ('k') | athena/home/home_card_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 06dc792fdf97951af29efb36afd76dc5624e1542..409a24957aa719374df6f4886d3b954eab552e2f 100644
--- a/athena/home/home_card_gesture_manager_unittest.cc
+++ b/athena/home/home_card_gesture_manager_unittest.cc
@@ -168,4 +168,16 @@ TEST_F(HomeCardGestureManagerTest, FlingDownAtEnd) {
EXPECT_EQ(HomeCard::VISIBLE_BOTTOM, final_state_);
}
+TEST_F(HomeCardGestureManagerTest, WeakFling) {
+ EXPECT_TRUE(ProcessGestureEvent(ui::ET_GESTURE_SCROLL_BEGIN, 1020));
+ EXPECT_EQ(0, GetEndCountAndReset());
+ EXPECT_EQ(0, GetProgressCountAndReset());
+
+ ProcessGestureEvent(ui::ET_GESTURE_SCROLL_UPDATE, 1010);
+ ProcessGestureEvent(ui::ET_GESTURE_SCROLL_UPDATE, 800);
+ ProcessFlingGesture(-30.0f);
+ EXPECT_EQ(1, GetEndCountAndReset());
+ EXPECT_EQ(HomeCard::VISIBLE_BOTTOM, final_state_);
+}
+
} // namespace athena
« no previous file with comments | « athena/home/home_card_gesture_manager.cc ('k') | athena/home/home_card_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698