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

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

Issue 2162193003: Separates out accelerators using non-common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@accelerators
Patch Set: sim=20 Created 4 years, 5 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/shell.cc ('k') | ash/wm/window_util.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 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.h" 7 #include "ash/accelerators/accelerator_controller_delegate_aura.h"
8 #include "ash/common/ash_switches.h" 8 #include "ash/common/ash_switches.h"
9 #include "ash/common/display/display_info.h" 9 #include "ash/common/display/display_info.h"
10 #include "ash/common/material_design/material_design_controller.h" 10 #include "ash/common/material_design/material_design_controller.h"
11 #include "ash/common/wm_shell.h" 11 #include "ash/common/wm_shell.h"
12 #include "ash/shell.h" 12 #include "ash/shell.h"
13 #include "ash/shell_init_params.h" 13 #include "ash/shell_init_params.h"
14 #include "ash/test/ash_test_views_delegate.h" 14 #include "ash/test/ash_test_views_delegate.h"
15 #include "ash/test/content/test_shell_content_state.h" 15 #include "ash/test/content/test_shell_content_state.h"
16 #include "ash/test/display_manager_test_api.h" 16 #include "ash/test/display_manager_test_api.h"
17 #include "ash/test/material_design_controller_test_api.h" 17 #include "ash/test/material_design_controller_test_api.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 Shell* shell = Shell::GetInstance(); 138 Shell* shell = Shell::GetInstance();
139 if (start_session) { 139 if (start_session) {
140 GetTestSessionStateDelegate()->SetActiveUserSessionStarted(true); 140 GetTestSessionStateDelegate()->SetActiveUserSessionStarted(true);
141 GetTestSessionStateDelegate()->SetHasActiveUser(true); 141 GetTestSessionStateDelegate()->SetHasActiveUser(true);
142 } 142 }
143 143
144 test::DisplayManagerTestApi().DisableChangeDisplayUponHostResize(); 144 test::DisplayManagerTestApi().DisableChangeDisplayUponHostResize();
145 ShellTestApi(shell).DisableDisplayAnimator(); 145 ShellTestApi(shell).DisableDisplayAnimator();
146 146
147 test_screenshot_delegate_ = new TestScreenshotDelegate(); 147 test_screenshot_delegate_ = new TestScreenshotDelegate();
148 shell->accelerator_controller()->SetScreenshotDelegate( 148 shell->accelerator_controller_delegate()->SetScreenshotDelegate(
149 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_)); 149 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_));
150 } 150 }
151 151
152 void AshTestHelper::TearDown() { 152 void AshTestHelper::TearDown() {
153 // Tear down the shell. 153 // Tear down the shell.
154 Shell::DeleteInstance(); 154 Shell::DeleteInstance();
155 test::MaterialDesignControllerTestAPI::Uninitialize(); 155 test::MaterialDesignControllerTestAPI::Uninitialize();
156 ShellContentState::DestroyInstance(); 156 ShellContentState::DestroyInstance();
157 157
158 test_screenshot_delegate_ = NULL; 158 test_screenshot_delegate_ = NULL;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 bool AshTestHelper::SupportsHostWindowResize() { 220 bool AshTestHelper::SupportsHostWindowResize() {
221 #if defined(OS_WIN) 221 #if defined(OS_WIN)
222 return false; 222 return false;
223 #else 223 #else
224 return true; 224 return true;
225 #endif 225 #endif
226 } 226 }
227 227
228 } // namespace test 228 } // namespace test
229 } // namespace ash 229 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | ash/wm/window_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698