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

Unified Diff: ash/wm/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 fix together with the test only, which will not fail on LSan bots anymore. 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
« no previous file with comments | « no previous file | ui/wm/core/window_animations.cc » ('j') | ui/wm/core/window_animations.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_animations_unittest.cc
diff --git a/ash/wm/window_animations_unittest.cc b/ash/wm/window_animations_unittest.cc
index 0e1a4d8b24d3553cb1b3c08093f60230dc0f8ad9..4bed566020a9aaa744d14fbbf29b59283c290ad8 100644
--- a/ash/wm/window_animations_unittest.cc
+++ b/ash/wm/window_animations_unittest.cc
@@ -95,6 +95,18 @@ TEST_F(WindowAnimationsTest, HideShowBrightnessGrayscaleAnimation) {
EXPECT_TRUE(window->layer()->visible());
}
+TEST_F(WindowAnimationsTest, HideRotateAnimationNoLeak) {
+ scoped_ptr<aura::Window> window(CreateTestWindowInShellWithId(0));
+ window->Show();
+ ::wm::SetWindowVisibilityAnimationType(
+ window.get(),
+ ::wm::WINDOW_VISIBILITY_ANIMATION_TYPE_ROTATE);
+
+ // Should not leak with LSAN enabled.
+ EXPECT_NO_FATAL_FAILURE(
+ AnimateOnChildWindowVisibilityChanged(window.get(), false));
+}
+
TEST_F(WindowAnimationsTest, LayerTargetVisibility) {
scoped_ptr<aura::Window> window(CreateTestWindowInShellWithId(0));
« no previous file with comments | « no previous file | ui/wm/core/window_animations.cc » ('j') | ui/wm/core/window_animations.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698