| Index: cc/input/scrollbar_animation_controller_thinning_unittest.cc
|
| diff --git a/cc/input/scrollbar_animation_controller_thinning_unittest.cc b/cc/input/scrollbar_animation_controller_thinning_unittest.cc
|
| index 384dbf244b096b98179faadbf722f162e1aa54f0..f238b8b986b051de542409b8bd8b1d02f898f090 100644
|
| --- a/cc/input/scrollbar_animation_controller_thinning_unittest.cc
|
| +++ b/cc/input/scrollbar_animation_controller_thinning_unittest.cc
|
| @@ -946,5 +946,31 @@ TEST_F(ScrollbarAnimationControllerThinningTest,
|
| EXPECT_EQ(kDelayBeforeStarting, client_.delay());
|
| }
|
|
|
| +// Ensure we have a delay fadeout animation after mouse leave without a mouse
|
| +// move.
|
| +TEST_F(ScrollbarAnimationControllerThinningTest, MouseLeaveFadeOut) {
|
| + base::TimeTicks time;
|
| + time += base::TimeDelta::FromSeconds(1);
|
| +
|
| + // Move mouse near scrollbar.
|
| + scrollbar_controller_->DidMouseMoveNear(VERTICAL, 1);
|
| +
|
| + // Scroll to make the scrollbars visible.
|
| + scrollbar_controller_->DidScrollBegin();
|
| + scrollbar_controller_->DidScrollUpdate(false);
|
| + scrollbar_controller_->DidScrollEnd();
|
| +
|
| + // Should not have delay fadeout animation.
|
| + EXPECT_TRUE(client_.start_fade().is_null() ||
|
| + client_.start_fade().IsCancelled());
|
| +
|
| + // Mouse leave.
|
| + scrollbar_controller_->DidMouseLeave();
|
| +
|
| + // An animation should have been enqueued.
|
| + EXPECT_FALSE(client_.start_fade().is_null());
|
| + EXPECT_EQ(kDelayBeforeStarting, client_.delay());
|
| +}
|
| +
|
| } // namespace
|
| } // namespace cc
|
|
|