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 5968bf32440b03211c8aa95231de08b5eaabf7e3..73d98fcb1a725fef10860c76556937da3124da1b 100644 |
--- a/ui/wm/core/window_animations_unittest.cc |
+++ b/ui/wm/core/window_animations_unittest.cc |
@@ -288,4 +288,21 @@ TEST_F(WindowAnimationsTest, NotifyHideCompleted) { |
EXPECT_TRUE(animation_host.hide_completed()); |
} |
+// The rotation animation for hiding a window should not leak the animation |
+// observer. |
+TEST_F(WindowAnimationsTest, RotateHideNoLeak) { |
+ 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); |
+ AnimateOnChildWindowVisibilityChanged(window.get(), false); |
+ |
+ EXPECT_NO_FATAL_FAILURE(animating_layer->GetAnimator()->StopAnimating()); |
sky
2014/07/17 15:59:40
None of the call you're calling in this macro asse
please use gerrit instead
2014/07/17 19:43:46
Done.
|
+} |
+ |
} // namespace wm |