| 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 c8ee16ecf75143394872b5a4edbb8c9e92bda832..3d0855e65e1adeedc1842b264b4b39454ce6c77e 100644
|
| --- a/cc/input/scrollbar_animation_controller_unittest.cc
|
| +++ b/cc/input/scrollbar_animation_controller_unittest.cc
|
| @@ -992,6 +992,7 @@ TEST_F(ScrollbarAnimationControllerAuraOverlayTest, BasicMouseHoverShow) {
|
|
|
| // Play the delay animation.
|
| client_.start_fade().Run();
|
| + EXPECT_TRUE(client_.start_fade().IsCancelled());
|
| EXPECT_FALSE(scrollbar_controller_->ScrollbarsHidden());
|
| }
|
|
|
| @@ -1019,7 +1020,7 @@ TEST_F(ScrollbarAnimationControllerAuraOverlayTest,
|
| }
|
|
|
| // Scrollbars should cancel delay show when mouse hover hidden scrollbar then
|
| -// move out.
|
| +// move out of scrollbar.
|
| TEST_F(ScrollbarAnimationControllerAuraOverlayTest,
|
| MouseHoverThenOutShouldCancelShow) {
|
| base::TimeTicks time;
|
| @@ -1040,6 +1041,27 @@ TEST_F(ScrollbarAnimationControllerAuraOverlayTest,
|
| client_.start_fade().IsCancelled());
|
| }
|
|
|
| +// Scrollbars should cancel delay show when mouse hover hidden scrollbar then
|
| +// move out of window.
|
| +TEST_F(ScrollbarAnimationControllerAuraOverlayTest,
|
| + MouseHoverThenLeaveShouldCancelShow) {
|
| + base::TimeTicks time;
|
| + time += base::TimeDelta::FromSeconds(1);
|
| +
|
| + // 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());
|
| +
|
| + // Move mouse out of window,delay show should be canceled.
|
| + scrollbar_controller_->DidMouseLeave();
|
| + EXPECT_TRUE(client_.start_fade().is_null() ||
|
| + client_.start_fade().IsCancelled());
|
| +}
|
| +
|
| class ScrollbarAnimationControllerAndroidTest
|
| : public testing::Test,
|
| public ScrollbarAnimationControllerClient {
|
|
|