OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/wm/core/window_animations.h" | 5 #include "ui/wm/core/window_animations.h" |
6 | 6 |
7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
8 #include "ui/aura/test/aura_test_base.h" | 8 #include "ui/aura/test/aura_test_base.h" |
9 #include "ui/aura/test/test_windows.h" | 9 #include "ui/aura/test/test_windows.h" |
10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
281 wm::SetWindowVisibilityAnimationType( | 281 wm::SetWindowVisibilityAnimationType( |
282 window.get(), WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); | 282 window.get(), WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); |
283 AnimateOnChildWindowVisibilityChanged(window.get(), true); | 283 AnimateOnChildWindowVisibilityChanged(window.get(), true); |
284 EXPECT_TRUE(window->layer()->visible()); | 284 EXPECT_TRUE(window->layer()->visible()); |
285 | 285 |
286 EXPECT_FALSE(animation_host.hide_completed()); | 286 EXPECT_FALSE(animation_host.hide_completed()); |
287 AnimateOnChildWindowVisibilityChanged(window.get(), false); | 287 AnimateOnChildWindowVisibilityChanged(window.get(), false); |
288 EXPECT_TRUE(animation_host.hide_completed()); | 288 EXPECT_TRUE(animation_host.hide_completed()); |
289 } | 289 } |
290 | 290 |
291 // The rotation animation for hidiing a window should not leak the animation | |
sky
2014/07/14 19:18:18
hidiing->hiding
please use gerrit instead
2014/07/14 20:12:17
Done.
| |
292 // observer. | |
293 TEST_F(WindowAnimationsTest, RotateHideNoLeak) { | |
294 scoped_ptr<aura::Window> window(aura::test::CreateTestWindowWithId(0, NULL)); | |
295 wm::SetWindowVisibilityAnimationType(window.get(), | |
296 WINDOW_VISIBILITY_ANIMATION_TYPE_ROTATE); | |
297 AnimateOnChildWindowVisibilityChanged(window.get(), true); | |
298 EXPECT_NO_FATAL_FAILURE( | |
299 AnimateOnChildWindowVisibilityChanged(window.get(), false)); | |
300 } | |
301 | |
291 } // namespace wm | 302 } // namespace wm |
OLD | NEW |