OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ash/wm/shadow_controller.h" | 5 #include "ash/wm/shadow_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/wm/shadow.h" | 10 #include "ash/wm/shadow.h" |
11 #include "ash/wm/shadow_types.h" | 11 #include "ash/wm/shadow_types.h" |
| 12 #include "ash/wm/window_properties.h" |
12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
13 #include "ui/aura/root_window.h" | 14 #include "ui/aura/root_window.h" |
14 #include "ui/aura/window.h" | 15 #include "ui/aura/window.h" |
15 #include "ui/aura_shell/shell.h" | 16 #include "ui/aura_shell/shell.h" |
16 #include "ui/aura_shell/test/aura_shell_test_base.h" | 17 #include "ui/aura_shell/test/aura_shell_test_base.h" |
17 #include "ui/aura_shell/window_properties.h" | |
18 #include "ui/gfx/compositor/layer.h" | 18 #include "ui/gfx/compositor/layer.h" |
19 | 19 |
20 namespace aura_shell { | 20 namespace aura_shell { |
21 namespace test { | 21 namespace test { |
22 | 22 |
23 typedef aura_shell::test::AuraShellTestBase ShadowControllerTest; | 23 typedef aura_shell::test::AuraShellTestBase ShadowControllerTest; |
24 | 24 |
25 // Tests that various methods in Window update the Shadow object as expected. | 25 // Tests that various methods in Window update the Shadow object as expected. |
26 TEST_F(ShadowControllerTest, Shadow) { | 26 TEST_F(ShadowControllerTest, Shadow) { |
27 scoped_ptr<aura::Window> window(new aura::Window(NULL)); | 27 scoped_ptr<aura::Window> window(new aura::Window(NULL)); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 82 |
83 // When we change the window's bounds, the shadow's should be updated too. | 83 // When we change the window's bounds, the shadow's should be updated too. |
84 gfx::Rect kNewBounds(50, 60, 500, 400); | 84 gfx::Rect kNewBounds(50, 60, 500, 400); |
85 window->SetBounds(kNewBounds); | 85 window->SetBounds(kNewBounds); |
86 EXPECT_EQ(gfx::Rect(kNewBounds.size()).ToString(), | 86 EXPECT_EQ(gfx::Rect(kNewBounds.size()).ToString(), |
87 shadow->content_bounds().ToString()); | 87 shadow->content_bounds().ToString()); |
88 } | 88 } |
89 | 89 |
90 } // namespace test | 90 } // namespace test |
91 } // namespace aura_shell | 91 } // namespace aura_shell |
OLD | NEW |