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

Side by Side Diff: ui/wm/core/visibility_controller_unittest.cc

Issue 196063002: Move wm/core to wm namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/wm/core/visibility_controller.cc ('k') | ui/wm/core/window_animations.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/visibility_controller.h" 5 #include "ui/wm/core/visibility_controller.h"
6 6
7 #include "ui/aura/test/aura_test_base.h" 7 #include "ui/aura/test/aura_test_base.h"
8 #include "ui/aura/test/test_window_delegate.h" 8 #include "ui/aura/test/test_window_delegate.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"
11 #include "ui/aura/window_event_dispatcher.h" 11 #include "ui/aura/window_event_dispatcher.h"
12 #include "ui/compositor/layer.h" 12 #include "ui/compositor/layer.h"
13 #include "ui/compositor/layer_animator.h" 13 #include "ui/compositor/layer_animator.h"
14 #include "ui/compositor/scoped_animation_duration_scale_mode.h" 14 #include "ui/compositor/scoped_animation_duration_scale_mode.h"
15 #include "ui/compositor/scoped_layer_animation_settings.h" 15 #include "ui/compositor/scoped_layer_animation_settings.h"
16 16
17 namespace views { 17 namespace wm {
18 namespace corewm {
19 18
20 typedef aura::test::AuraTestBase VisibilityControllerTest; 19 typedef aura::test::AuraTestBase VisibilityControllerTest;
21 20
22 // Hiding a window in an animatable container should not hide the window's layer 21 // Hiding a window in an animatable container should not hide the window's layer
23 // immediately. 22 // immediately.
24 TEST_F(VisibilityControllerTest, AnimateHideDoesntHideWindowLayer) { 23 TEST_F(VisibilityControllerTest, AnimateHideDoesntHideWindowLayer) {
25 // We cannot disable animations for this test. 24 // We cannot disable animations for this test.
26 ui::ScopedAnimationDurationScaleMode normal_duration_mode( 25 ui::ScopedAnimationDurationScaleMode normal_duration_mode(
27 ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION); 26 ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION);
28 27
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 IsAnimatingProperty(ui::LayerAnimationElement::OPACITY)); 83 IsAnimatingProperty(ui::LayerAnimationElement::OPACITY));
85 EXPECT_EQ(0.0f, window->layer()->GetTargetOpacity()); 84 EXPECT_EQ(0.0f, window->layer()->GetTargetOpacity());
86 85
87 // Check that the visibility is correct after the hide animation has finished. 86 // Check that the visibility is correct after the hide animation has finished.
88 window->Hide(); 87 window->Hide();
89 window->layer()->GetAnimator()->StopAnimating(); 88 window->layer()->GetAnimator()->StopAnimating();
90 EXPECT_FALSE(window->layer()->visible()); 89 EXPECT_FALSE(window->layer()->visible());
91 EXPECT_FALSE(window->IsVisible()); 90 EXPECT_FALSE(window->IsVisible());
92 } 91 }
93 92
94 } // namespace corewm 93 } // namespace wm
95 } // namespace views
OLDNEW
« no previous file with comments | « ui/wm/core/visibility_controller.cc ('k') | ui/wm/core/window_animations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698