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

Unified Diff: athena/home/home_card_gesture_manager_unittest.cc

Issue 529813002: Simplify HomeCardGestureManager::UpdateScrollState() (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 409a24957aa719374df6f4886d3b954eab552e2f..e764f8453611db663090d9d2c4649aa37846cc08 100644
--- a/athena/home/home_card_gesture_manager_unittest.cc
+++ b/athena/home/home_card_gesture_manager_unittest.cc
@@ -110,6 +110,13 @@ TEST_F(HomeCardGestureManagerTest, Basic) {
EXPECT_EQ(HomeCard::VISIBLE_BOTTOM, last_to_state_);
EXPECT_GT(1.0f, last_progress_);
+ ProcessGestureEvent(ui::ET_GESTURE_SCROLL_UPDATE, 1020);
+ ProcessGestureEvent(ui::ET_GESTURE_SCROLL_UPDATE, 1022);
+ EXPECT_EQ(2, GetProgressCountAndReset());
+ EXPECT_EQ(HomeCard::VISIBLE_BOTTOM, last_from_state_);
+ EXPECT_EQ(HomeCard::VISIBLE_MINIMIZED, last_to_state_);
+ EXPECT_EQ(1.0f, last_progress_);
+
ProcessGestureEvent(ui::ET_GESTURE_SCROLL_UPDATE, 1010);
float progress_1010 = last_progress_;
ProcessGestureEvent(ui::ET_GESTURE_SCROLL_UPDATE, 1008);

Powered by Google App Engine
This is Rietveld 408576698