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

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

Issue 2874963002: chromeos: wireup more display management for mushrome (Closed)
Patch Set: 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
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 if (config_ != Config::MASH) {
182 // ScreenLayoutObserver is specific to classic-ash. 183 // ScreenLayoutObserver is specific to classic-ash.
msw 2017/05/11 01:07:17 nit: update comment, ditto below (line 189)
sky 2017/05/11 14:06:53 Done.
183 // Tests that change the display configuration generally don't care about 184 // Tests that change the display configuration generally don't care about
184 // the notifications and the popup UI can interfere with things like 185 // the notifications and the popup UI can interfere with things like
185 // cursors. 186 // cursors.
186 shell->screen_layout_observer()->set_show_notifications_for_testing(false); 187 shell->screen_layout_observer()->set_show_notifications_for_testing(false);
187 188
188 // DisplayManager is specific to classic-ash. 189 // DisplayManager is specific to classic-ash.
189 display::test::DisplayManagerTestApi(shell->display_manager()) 190 display::test::DisplayManagerTestApi(shell->display_manager())
190 .DisableChangeDisplayUponHostResize(); 191 .DisableChangeDisplayUponHostResize();
191 DisplayConfigurationControllerTestApi( 192 DisplayConfigurationControllerTestApi(
192 shell->display_configuration_controller()) 193 shell->display_configuration_controller())
193 .DisableDisplayAnimator(); 194 .DisableDisplayAnimator();
195 }
194 196
197 if (config_ == Config::CLASSIC) {
195 // TODO: disabled for mash as AcceleratorControllerDelegateAura isn't 198 // TODO: disabled for mash as AcceleratorControllerDelegateAura isn't
196 // created in mash http://crbug.com/632111. 199 // created in mash http://crbug.com/632111.
197 test_screenshot_delegate_ = new TestScreenshotDelegate(); 200 test_screenshot_delegate_ = new TestScreenshotDelegate();
198 ShellPortClassic::Get() 201 ShellPortClassic::Get()
199 ->accelerator_controller_delegate() 202 ->accelerator_controller_delegate()
200 ->SetScreenshotDelegate( 203 ->SetScreenshotDelegate(
201 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_)); 204 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_));
202 } else if (config_ == Config::MUS) { 205 } else if (config_ == Config::MUS) {
203 test_screenshot_delegate_ = new TestScreenshotDelegate(); 206 test_screenshot_delegate_ = new TestScreenshotDelegate();
204 mus::ShellPortMash::Get() 207 mus::ShellPortMash::Get()
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 std::set<RootWindowController*> roots = 414 std::set<RootWindowController*> roots =
412 window_manager_app_->window_manager()->GetRootWindowControllers(); 415 window_manager_app_->window_manager()->GetRootWindowControllers();
413 std::vector<RootWindowController*> ordered_roots; 416 std::vector<RootWindowController*> ordered_roots;
414 ordered_roots.insert(ordered_roots.begin(), roots.begin(), roots.end()); 417 ordered_roots.insert(ordered_roots.begin(), roots.begin(), roots.end());
415 std::sort(ordered_roots.begin(), ordered_roots.end(), &CompareByDisplayId); 418 std::sort(ordered_roots.begin(), ordered_roots.end(), &CompareByDisplayId);
416 return ordered_roots; 419 return ordered_roots;
417 } 420 }
418 421
419 } // namespace test 422 } // namespace test
420 } // namespace ash 423 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698