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

Unified Diff: ash/wm/overview/window_selector_unittest.cc

Issue 291843012: compositor: Tick the UI animations from cc, instead of from timer callbacks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 7 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
Index: ash/wm/overview/window_selector_unittest.cc
diff --git a/ash/wm/overview/window_selector_unittest.cc b/ash/wm/overview/window_selector_unittest.cc
index 214104093b949bcebd0b46aca74b267743c4b811..b3c0c05dd0d868f9242754a8c1b7894e4a597b94 100644
--- a/ash/wm/overview/window_selector_unittest.cc
+++ b/ash/wm/overview/window_selector_unittest.cc
@@ -36,6 +36,7 @@
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
+#include "ui/compositor/test/layer_animator_collection_test_controller.h"
#include "ui/gfx/rect_conversions.h"
#include "ui/gfx/transform.h"
#include "ui/views/controls/label.h"
@@ -326,6 +327,13 @@ TEST_F(WindowSelectorTest, MinimizedWindowVisibility) {
EXPECT_FALSE(window1->IsVisible());
EXPECT_FALSE(window1->layer()->GetTargetVisibility());
}
+
+ // Toggling overview mode initiates animations on |window1|, as well as other
+ // windows used for the overview mode. Make sure the animations are stopped to
+ // avoid leaking the animators.
+ ui::LayerAnimatorCollectionTestController collection_controller(
+ window1->layer()->GetCompositor()->layer_animator_collection());
+ collection_controller.StopAllAnimators();
}
// Tests that a bounds change during overview is corrected for.

Powered by Google App Engine
This is Rietveld 408576698