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

Side by Side Diff: ash/test/ash_test_helper.cc

Issue 2355063002: Separate ash::test::DisplayManagerTestApi from ash (Closed)
Patch Set: review comment Created 4 years, 2 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
« no previous file with comments | « ash/test/ash_test_base.cc ('k') | ash/test/ash_test_impl_aura.cc » ('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 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/common/material_design/material_design_controller.h" 8 #include "ash/common/material_design/material_design_controller.h"
9 #include "ash/common/test/material_design_controller_test_api.h" 9 #include "ash/common/test/material_design_controller_test_api.h"
10 #include "ash/common/wm_shell.h" 10 #include "ash/common/wm_shell.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 Shell::CreateInstance(init_params); 130 Shell::CreateInstance(init_params);
131 aura::test::EnvTestHelper(aura::Env::GetInstance()) 131 aura::test::EnvTestHelper(aura::Env::GetInstance())
132 .SetInputStateLookup(std::unique_ptr<aura::InputStateLookup>()); 132 .SetInputStateLookup(std::unique_ptr<aura::InputStateLookup>());
133 133
134 Shell* shell = Shell::GetInstance(); 134 Shell* shell = Shell::GetInstance();
135 if (start_session) { 135 if (start_session) {
136 GetTestSessionStateDelegate()->SetActiveUserSessionStarted(true); 136 GetTestSessionStateDelegate()->SetActiveUserSessionStarted(true);
137 GetTestSessionStateDelegate()->SetHasActiveUser(true); 137 GetTestSessionStateDelegate()->SetHasActiveUser(true);
138 } 138 }
139 139
140 test::DisplayManagerTestApi().DisableChangeDisplayUponHostResize(); 140 test::DisplayManagerTestApi(Shell::GetInstance()->display_manager())
141 .DisableChangeDisplayUponHostResize();
141 ShellTestApi(shell).DisableDisplayAnimator(); 142 ShellTestApi(shell).DisableDisplayAnimator();
142 143
143 test_screenshot_delegate_ = new TestScreenshotDelegate(); 144 test_screenshot_delegate_ = new TestScreenshotDelegate();
144 shell->accelerator_controller_delegate()->SetScreenshotDelegate( 145 shell->accelerator_controller_delegate()->SetScreenshotDelegate(
145 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_)); 146 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_));
146 } 147 }
147 148
148 void AshTestHelper::TearDown() { 149 void AshTestHelper::TearDown() {
149 // Tear down the shell. 150 // Tear down the shell.
150 Shell::DeleteInstance(); 151 Shell::DeleteInstance();
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 bool AshTestHelper::SupportsMultipleDisplays() { 209 bool AshTestHelper::SupportsMultipleDisplays() {
209 #if defined(OS_WIN) 210 #if defined(OS_WIN)
210 return false; 211 return false;
211 #else 212 #else
212 return true; 213 return true;
213 #endif 214 #endif
214 } 215 }
215 216
216 } // namespace test 217 } // namespace test
217 } // namespace ash 218 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/ash_test_base.cc ('k') | ash/test/ash_test_impl_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698