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

Unified Diff: cc/input/scrollbar_animation_controller_unittest.cc

Issue 2766383002: Reset need_trigger_scrollbar_show_ in SAC::DidMouseLeave (Closed)
Patch Set: Created 3 years, 9 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 | « cc/input/scrollbar_animation_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/input/scrollbar_animation_controller_unittest.cc
diff --git a/cc/input/scrollbar_animation_controller_unittest.cc b/cc/input/scrollbar_animation_controller_unittest.cc
index 3d0855e65e1adeedc1842b264b4b39454ce6c77e..a8152a4158ca86cc5a66cd93390323a09ef810f7 100644
--- a/cc/input/scrollbar_animation_controller_unittest.cc
+++ b/cc/input/scrollbar_animation_controller_unittest.cc
@@ -1044,7 +1044,7 @@ TEST_F(ScrollbarAnimationControllerAuraOverlayTest,
// Scrollbars should cancel delay show when mouse hover hidden scrollbar then
// move out of window.
TEST_F(ScrollbarAnimationControllerAuraOverlayTest,
- MouseHoverThenLeaveShouldCancelShow) {
+ MouseHoverThenLeaveShouldCancelShowThenEnterShouldShow) {
base::TimeTicks time;
time += base::TimeDelta::FromSeconds(1);
@@ -1060,6 +1060,19 @@ TEST_F(ScrollbarAnimationControllerAuraOverlayTest,
scrollbar_controller_->DidMouseLeave();
EXPECT_TRUE(client_.start_fade().is_null() ||
client_.start_fade().IsCancelled());
+
+ // Move mouse over scrollbar.
+ scrollbar_controller_->DidMouseMoveNear(VERTICAL, 0);
+
+ // An show animation should have been enqueued.
+ EXPECT_FALSE(client_.start_fade().is_null());
+ EXPECT_FALSE(client_.start_fade().IsCancelled());
+ EXPECT_EQ(kShowDelay, client_.delay());
+
+ // Play the delay animation.
+ client_.start_fade().Run();
+ EXPECT_TRUE(client_.start_fade().IsCancelled());
+ EXPECT_FALSE(scrollbar_controller_->ScrollbarsHidden());
}
class ScrollbarAnimationControllerAndroidTest
« no previous file with comments | « cc/input/scrollbar_animation_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698