| Index: ui/wm/core/window_animations_unittest.cc
|
| diff --git a/ui/wm/core/window_animations_unittest.cc b/ui/wm/core/window_animations_unittest.cc
|
| index 095ea02d2635c325b3ffd86645065e5d7a2f2b03..84bd151d38b8e9d804397ae3a1b9be7b7718b03d 100644
|
| --- a/ui/wm/core/window_animations_unittest.cc
|
| +++ b/ui/wm/core/window_animations_unittest.cc
|
| @@ -300,4 +300,21 @@ TEST_F(WindowAnimationsTest, RotateHideNoLeak) {
|
| animating_layer->GetAnimator()->StopAnimating();
|
| }
|
|
|
| +// The rotation animation for hiding a window should not crash when terminated
|
| +// by LayerAnimator::StopAnimating().
|
| +TEST_F(WindowAnimationsTest, RotateHideNoCrash) {
|
| + ui::ScopedAnimationDurationScaleMode scale_mode(
|
| + ui::ScopedAnimationDurationScaleMode::FAST_DURATION);
|
| +
|
| + scoped_ptr<aura::Window> window(aura::test::CreateTestWindowWithId(0, NULL));
|
| + ui::Layer* animating_layer = window->layer();
|
| + wm::SetWindowVisibilityAnimationType(window.get(),
|
| + WINDOW_VISIBILITY_ANIMATION_TYPE_ROTATE);
|
| + AnimateOnChildWindowVisibilityChanged(window.get(), true);
|
| + window->layer()->GetAnimator()->Step(base::TimeTicks::Now() +
|
| + base::TimeDelta::FromSeconds(5));
|
| + AnimateOnChildWindowVisibilityChanged(window.get(), false);
|
| + animating_layer->GetAnimator()->StopAnimating();
|
| +}
|
| +
|
| } // namespace wm
|
|
|