Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Unified Diff: ui/wm/core/window_animations_unittest.cc

Issue 343753007: Fix a leak in wm::AnimateOnChildWindowVisibilityChanged(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: The test and the fix. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« ui/wm/core/window_animations.cc ('K') | « ui/wm/core/window_animations.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..62a3f64d8bcdd6f5ea6c6ecfd9291685e42e3b22 100644
--- a/ui/wm/core/window_animations_unittest.cc
+++ b/ui/wm/core/window_animations_unittest.cc
@@ -288,4 +288,15 @@ TEST_F(WindowAnimationsTest, NotifyHideCompleted) {
EXPECT_TRUE(animation_host.hide_completed());
}
+// The rotation animation for hidiing a window should not leak the animation
+// observer.
+TEST_F(WindowAnimationsTest, RotateHideNoLeak) {
+ scoped_ptr<aura::Window> window(aura::test::CreateTestWindowWithId(0, NULL));
+ wm::SetWindowVisibilityAnimationType(window.get(),
+ WINDOW_VISIBILITY_ANIMATION_TYPE_ROTATE);
+ AnimateOnChildWindowVisibilityChanged(window.get(), true);
+ EXPECT_NO_FATAL_FAILURE(
+ AnimateOnChildWindowVisibilityChanged(window.get(), false));
+}
+
} // namespace wm
« ui/wm/core/window_animations.cc ('K') | « ui/wm/core/window_animations.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698