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 "ui/aura_shell/workspace_controller.h" | 5 #include "ui/aura_shell/workspace_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_stacking_client.h" | 8 #include "ui/aura/root_window.h" |
9 #include "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
10 #include "ui/aura_shell/activation_controller.h" | 10 #include "ui/aura_shell/activation_controller.h" |
11 #include "ui/aura_shell/shell_window_ids.h" | 11 #include "ui/aura_shell/shell_window_ids.h" |
12 #include "ui/aura_shell/window_util.h" | 12 #include "ui/aura_shell/window_util.h" |
13 #include "ui/aura_shell/workspace/workspace.h" | 13 #include "ui/aura_shell/workspace/workspace.h" |
14 #include "ui/aura_shell/workspace/workspace_manager.h" | 14 #include "ui/aura_shell/workspace/workspace_manager.h" |
15 | 15 |
16 namespace aura_shell { | 16 namespace aura_shell { |
17 namespace internal { | 17 namespace internal { |
18 | 18 |
19 using aura::Window; | 19 using aura::Window; |
20 | 20 |
21 class WorkspaceControllerTest : public aura::test::AuraTestBase { | 21 class WorkspaceControllerTest : public aura::test::AuraTestBase { |
22 public: | 22 public: |
23 WorkspaceControllerTest() {} | 23 WorkspaceControllerTest() {} |
24 virtual ~WorkspaceControllerTest() {} | 24 virtual ~WorkspaceControllerTest() {} |
25 | 25 |
26 virtual void SetUp() OVERRIDE { | 26 virtual void SetUp() OVERRIDE { |
27 aura::test::AuraTestBase::SetUp(); | 27 aura::test::AuraTestBase::SetUp(); |
28 contents_view_ = GetTestStackingClient()->default_container(); | 28 contents_view_ = aura::RootWindow::GetInstance(); |
29 // Activatable windows need to be in a container the ActivationController | 29 // Activatable windows need to be in a container the ActivationController |
30 // recognizes. | 30 // recognizes. |
31 contents_view_->set_id( | 31 contents_view_->set_id( |
32 aura_shell::internal::kShellWindowId_DefaultContainer); | 32 aura_shell::internal::kShellWindowId_DefaultContainer); |
33 activation_controller_.reset(new ActivationController); | 33 activation_controller_.reset(new ActivationController); |
34 activation_controller_->set_default_container_for_test(contents_view_); | 34 activation_controller_->set_default_container_for_test(contents_view_); |
35 controller_.reset(new WorkspaceController(contents_view_)); | 35 controller_.reset(new WorkspaceController(contents_view_)); |
36 } | 36 } |
37 | 37 |
38 virtual void TearDown() OVERRIDE { | 38 virtual void TearDown() OVERRIDE { |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 // The size of contents_view() for no workspace case must be | 110 // The size of contents_view() for no workspace case must be |
111 // same as one contents_view() case. | 111 // same as one contents_view() case. |
112 EXPECT_EQ("0,0 500x300", contents_view()->bounds().ToString()); | 112 EXPECT_EQ("0,0 500x300", contents_view()->bounds().ToString()); |
113 | 113 |
114 // Reset now before windows are destroyed. | 114 // Reset now before windows are destroyed. |
115 controller_.reset(); | 115 controller_.reset(); |
116 } | 116 } |
117 | 117 |
118 } // namespace internal | 118 } // namespace internal |
119 } // namespace aura_shell | 119 } // namespace aura_shell |
OLD | NEW |