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

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

Issue 2874963002: chromeos: wireup more display management for mushrome (Closed)
Patch Set: better comment Created 3 years, 7 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/system/screen_layout_observer.cc ('k') | testing/buildbot/filters/ash_mus_unittests.filter » ('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/ash_switches.h" 8 #include "ash/ash_switches.h"
9 #include "ash/aura/shell_port_classic.h" 9 #include "ash/aura/shell_port_classic.h"
10 #include "ash/mus/bridge/shell_port_mash.h" 10 #include "ash/mus/bridge/shell_port_mash.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 std::unique_ptr<aura::InputStateLookup>()); 171 std::unique_ptr<aura::InputStateLookup>());
172 172
173 Shell* shell = Shell::Get(); 173 Shell* shell = Shell::Get();
174 session_controller_client_.reset( 174 session_controller_client_.reset(
175 new TestSessionControllerClient(shell->session_controller())); 175 new TestSessionControllerClient(shell->session_controller()));
176 session_controller_client_->InitializeAndBind(); 176 session_controller_client_->InitializeAndBind();
177 177
178 if (start_session) 178 if (start_session)
179 session_controller_client_->CreatePredefinedUserSessions(1); 179 session_controller_client_->CreatePredefinedUserSessions(1);
180 180
181 if (config_ == Config::CLASSIC) { 181 // TODO(sky): mash should use this too http://crbug.com/718860.
182 // ScreenLayoutObserver is specific to classic-ash. 182 if (config_ != Config::MASH) {
183 // Tests that change the display configuration generally don't care about 183 // Tests that change the display configuration generally don't care about
184 // the notifications and the popup UI can interfere with things like 184 // the notifications and the popup UI can interfere with things like
185 // cursors. 185 // cursors.
186 shell->screen_layout_observer()->set_show_notifications_for_testing(false); 186 shell->screen_layout_observer()->set_show_notifications_for_testing(false);
187 187
188 // DisplayManager is specific to classic-ash.
189 display::test::DisplayManagerTestApi(shell->display_manager()) 188 display::test::DisplayManagerTestApi(shell->display_manager())
190 .DisableChangeDisplayUponHostResize(); 189 .DisableChangeDisplayUponHostResize();
191 DisplayConfigurationControllerTestApi( 190 DisplayConfigurationControllerTestApi(
192 shell->display_configuration_controller()) 191 shell->display_configuration_controller())
193 .DisableDisplayAnimator(); 192 .DisableDisplayAnimator();
193 }
194 194
195 if (config_ == Config::CLASSIC) {
195 // TODO: disabled for mash as AcceleratorControllerDelegateAura isn't 196 // TODO: disabled for mash as AcceleratorControllerDelegateAura isn't
196 // created in mash http://crbug.com/632111. 197 // created in mash http://crbug.com/632111.
197 test_screenshot_delegate_ = new TestScreenshotDelegate(); 198 test_screenshot_delegate_ = new TestScreenshotDelegate();
198 ShellPortClassic::Get() 199 ShellPortClassic::Get()
199 ->accelerator_controller_delegate() 200 ->accelerator_controller_delegate()
200 ->SetScreenshotDelegate( 201 ->SetScreenshotDelegate(
201 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_)); 202 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_));
202 } else if (config_ == Config::MUS) { 203 } else if (config_ == Config::MUS) {
203 test_screenshot_delegate_ = new TestScreenshotDelegate(); 204 test_screenshot_delegate_ = new TestScreenshotDelegate();
204 mus::ShellPortMash::Get() 205 mus::ShellPortMash::Get()
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 std::set<RootWindowController*> roots = 412 std::set<RootWindowController*> roots =
412 window_manager_app_->window_manager()->GetRootWindowControllers(); 413 window_manager_app_->window_manager()->GetRootWindowControllers();
413 std::vector<RootWindowController*> ordered_roots; 414 std::vector<RootWindowController*> ordered_roots;
414 ordered_roots.insert(ordered_roots.begin(), roots.begin(), roots.end()); 415 ordered_roots.insert(ordered_roots.begin(), roots.begin(), roots.end());
415 std::sort(ordered_roots.begin(), ordered_roots.end(), &CompareByDisplayId); 416 std::sort(ordered_roots.begin(), ordered_roots.end(), &CompareByDisplayId);
416 return ordered_roots; 417 return ordered_roots;
417 } 418 }
418 419
419 } // namespace test 420 } // namespace test
420 } // namespace ash 421 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/screen_layout_observer.cc ('k') | testing/buildbot/filters/ash_mus_unittests.filter » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698