| Index: ui/gfx/animation/slide_animation_unittest.cc
|
| diff --git a/ui/gfx/animation/slide_animation_unittest.cc b/ui/gfx/animation/slide_animation_unittest.cc
|
| index b22dab77ca9279481e3c72384f3833d9f3dcae00..121fa66b286dda80a41e3c430f2b7567af0d513e 100644
|
| --- a/ui/gfx/animation/slide_animation_unittest.cc
|
| +++ b/ui/gfx/animation/slide_animation_unittest.cc
|
| @@ -41,7 +41,7 @@ class SlideAnimationTest: public testing::Test {
|
|
|
| // Tests animation construction.
|
| TEST_F(SlideAnimationTest, InitialState) {
|
| - SlideAnimation animation(NULL);
|
| + SlideAnimation animation(nullptr);
|
| // By default, slide animations are 60 Hz, so the timer interval should be
|
| // 1/60th of a second.
|
| EXPECT_EQ(1000 / 60, animation.timer_interval().InMilliseconds());
|
| @@ -55,7 +55,7 @@ TEST_F(SlideAnimationTest, InitialState) {
|
| }
|
|
|
| TEST_F(SlideAnimationTest, Basics) {
|
| - SlideAnimation animation(NULL);
|
| + SlideAnimation animation(nullptr);
|
| SlideAnimation::TestApi test_api(&animation);
|
|
|
| // Use linear tweening to make the math easier below.
|
| @@ -87,6 +87,22 @@ TEST_F(SlideAnimationTest, Basics) {
|
| EXPECT_FALSE(animation.IsClosing());
|
| }
|
|
|
| +TEST_F(SlideAnimationTest, ShowAndHideImmediately) {
|
| + SlideAnimation animation(nullptr);
|
| + SlideAnimation::TestApi test_api(&animation);
|
| +
|
| + EXPECT_NE(1.0, animation.GetCurrentValue());
|
| +
|
| + animation.ShowImmediately();
|
| + EXPECT_FALSE(animation.is_animating());
|
| + EXPECT_TRUE(animation.IsShowing());
|
| + EXPECT_EQ(1.0, animation.GetCurrentValue());
|
| +
|
| + animation.HideImmediately();
|
| + EXPECT_FALSE(animation.is_animating());
|
| + EXPECT_EQ(0.0, animation.GetCurrentValue());
|
| +}
|
| +
|
| // Tests that delegate is not notified when animation is running and is deleted.
|
| // (Such a scenario would cause problems for BoundsAnimator).
|
| TEST_F(SlideAnimationTest, DontNotifyOnDelete) {
|
|
|