OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/test/ash_test_helper.h" | 5 #include "ash/test/ash_test_helper.h" |
6 | 6 |
7 #include "ash/accelerators/accelerator_controller_delegate_aura.h" | 7 #include "ash/accelerators/accelerator_controller_delegate_aura.h" |
8 #include "ash/aura/wm_shell_aura.h" | 8 #include "ash/aura/wm_shell_aura.h" |
9 #include "ash/common/test/test_session_state_delegate.h" | 9 #include "ash/common/test/test_session_state_delegate.h" |
10 #include "ash/common/test/test_system_tray_delegate.h" | 10 #include "ash/common/test/test_system_tray_delegate.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 ui::MaterialDesignController::Initialize(); | 135 ui::MaterialDesignController::Initialize(); |
136 | 136 |
137 if (is_mash) | 137 if (is_mash) |
138 CreateMashWindowManager(); | 138 CreateMashWindowManager(); |
139 else | 139 else |
140 CreateShell(); | 140 CreateShell(); |
141 | 141 |
142 aura::test::EnvTestHelper().SetInputStateLookup( | 142 aura::test::EnvTestHelper().SetInputStateLookup( |
143 std::unique_ptr<aura::InputStateLookup>()); | 143 std::unique_ptr<aura::InputStateLookup>()); |
144 | 144 |
| 145 session_controller_client_.reset( |
| 146 new TestSessionControllerClient(WmShell::Get()->session_controller())); |
| 147 session_controller_client_->InitializeAndBind(); |
| 148 |
145 Shell* shell = Shell::GetInstance(); | 149 Shell* shell = Shell::GetInstance(); |
146 if (start_session) { | 150 if (start_session) |
147 GetTestSessionStateDelegate()->SetActiveUserSessionStarted(true); | 151 session_controller_client_->CreatePredefinedUserSessions(1); |
148 GetTestSessionStateDelegate()->SetHasActiveUser(true); | |
149 } | |
150 | 152 |
151 if (!is_mash) { | 153 if (!is_mash) { |
152 // ScreenLayoutObserver is specific to classic-ash. | 154 // ScreenLayoutObserver is specific to classic-ash. |
153 // Tests that change the display configuration generally don't care about | 155 // Tests that change the display configuration generally don't care about |
154 // the notifications and the popup UI can interfere with things like | 156 // the notifications and the popup UI can interfere with things like |
155 // cursors. | 157 // cursors. |
156 shell->screen_layout_observer()->set_show_notifications_for_testing(false); | 158 shell->screen_layout_observer()->set_show_notifications_for_testing(false); |
157 | 159 |
158 // DisplayManager is specific to classic-ash. | 160 // DisplayManager is specific to classic-ash. |
159 display::test::DisplayManagerTestApi( | 161 display::test::DisplayManagerTestApi( |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 std::set<RootWindowController*> roots = | 371 std::set<RootWindowController*> roots = |
370 window_manager_app_->window_manager()->GetRootWindowControllers(); | 372 window_manager_app_->window_manager()->GetRootWindowControllers(); |
371 std::vector<RootWindowController*> ordered_roots; | 373 std::vector<RootWindowController*> ordered_roots; |
372 ordered_roots.insert(ordered_roots.begin(), roots.begin(), roots.end()); | 374 ordered_roots.insert(ordered_roots.begin(), roots.begin(), roots.end()); |
373 std::sort(ordered_roots.begin(), ordered_roots.end(), &CompareByDisplayId); | 375 std::sort(ordered_roots.begin(), ordered_roots.end(), &CompareByDisplayId); |
374 return ordered_roots; | 376 return ordered_roots; |
375 } | 377 } |
376 | 378 |
377 } // namespace test | 379 } // namespace test |
378 } // namespace ash | 380 } // namespace ash |
OLD | NEW |