| 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" |
| 11 #include "ash/common/test/wm_shell_test_api.h" | 11 #include "ash/common/test/wm_shell_test_api.h" |
| 12 #include "ash/common/wm_shell.h" | 12 #include "ash/common/wm_shell.h" |
| 13 #include "ash/common/wm_window.h" | 13 #include "ash/common/wm_window.h" |
| 14 #include "ash/mus/screen_mus.h" | 14 #include "ash/mus/screen_mus.h" |
| 15 #include "ash/mus/window_manager.h" | 15 #include "ash/mus/window_manager.h" |
| 16 #include "ash/mus/window_manager_application.h" | 16 #include "ash/mus/window_manager_application.h" |
| 17 #include "ash/shell.h" | 17 #include "ash/shell.h" |
| 18 #include "ash/shell_init_params.h" | 18 #include "ash/shell_init_params.h" |
| 19 #include "ash/system/chromeos/screen_layout_observer.h" | 19 #include "ash/system/chromeos/screen_layout_observer.h" |
| 20 #include "ash/test/ash_test_environment.h" | 20 #include "ash/test/ash_test_environment.h" |
| 21 #include "ash/test/ash_test_views_delegate.h" | 21 #include "ash/test/ash_test_views_delegate.h" |
| 22 #include "ash/test/shell_test_api.h" | 22 #include "ash/test/display_configuration_controller_test_api.h" |
| 23 #include "ash/test/test_screenshot_delegate.h" | 23 #include "ash/test/test_screenshot_delegate.h" |
| 24 #include "ash/test/test_shell_delegate.h" | 24 #include "ash/test/test_shell_delegate.h" |
| 25 #include "base/memory/ptr_util.h" | 25 #include "base/memory/ptr_util.h" |
| 26 #include "base/run_loop.h" | 26 #include "base/run_loop.h" |
| 27 #include "base/strings/string_split.h" | 27 #include "base/strings/string_split.h" |
| 28 #include "base/test/sequenced_worker_pool_owner.h" | 28 #include "base/test/sequenced_worker_pool_owner.h" |
| 29 #include "chromeos/audio/cras_audio_handler.h" | 29 #include "chromeos/audio/cras_audio_handler.h" |
| 30 #include "chromeos/dbus/dbus_thread_manager.h" | 30 #include "chromeos/dbus/dbus_thread_manager.h" |
| 31 #include "device/bluetooth/bluetooth_adapter_factory.h" | 31 #include "device/bluetooth/bluetooth_adapter_factory.h" |
| 32 #include "device/bluetooth/dbus/bluez_dbus_manager.h" | 32 #include "device/bluetooth/dbus/bluez_dbus_manager.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 // ScreenLayoutObserver is specific to classic-ash. | 152 // ScreenLayoutObserver is specific to classic-ash. |
| 153 // Tests that change the display configuration generally don't care about | 153 // Tests that change the display configuration generally don't care about |
| 154 // the notifications and the popup UI can interfere with things like | 154 // the notifications and the popup UI can interfere with things like |
| 155 // cursors. | 155 // cursors. |
| 156 shell->screen_layout_observer()->set_show_notifications_for_testing(false); | 156 shell->screen_layout_observer()->set_show_notifications_for_testing(false); |
| 157 | 157 |
| 158 // DisplayManager is specific to classic-ash. | 158 // DisplayManager is specific to classic-ash. |
| 159 display::test::DisplayManagerTestApi( | 159 display::test::DisplayManagerTestApi( |
| 160 Shell::GetInstance()->display_manager()) | 160 Shell::GetInstance()->display_manager()) |
| 161 .DisableChangeDisplayUponHostResize(); | 161 .DisableChangeDisplayUponHostResize(); |
| 162 ShellTestApi(shell).DisableDisplayAnimator(); | 162 DisplayConfigurationControllerTestApi( |
| 163 shell->display_configuration_controller()) |
| 164 .DisableDisplayAnimator(); |
| 163 | 165 |
| 164 // TODO: disabled for mash as AcceleratorControllerDelegateAura isn't | 166 // TODO: disabled for mash as AcceleratorControllerDelegateAura isn't |
| 165 // created in mash http://crbug.com/632111. | 167 // created in mash http://crbug.com/632111. |
| 166 test_screenshot_delegate_ = new TestScreenshotDelegate(); | 168 test_screenshot_delegate_ = new TestScreenshotDelegate(); |
| 167 WmShellAura::Get() | 169 WmShellAura::Get() |
| 168 ->accelerator_controller_delegate() | 170 ->accelerator_controller_delegate() |
| 169 ->SetScreenshotDelegate( | 171 ->SetScreenshotDelegate( |
| 170 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_)); | 172 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_)); |
| 171 } | 173 } |
| 172 } | 174 } |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 std::set<RootWindowController*> roots = | 369 std::set<RootWindowController*> roots = |
| 368 window_manager_app_->window_manager()->GetRootWindowControllers(); | 370 window_manager_app_->window_manager()->GetRootWindowControllers(); |
| 369 std::vector<RootWindowController*> ordered_roots; | 371 std::vector<RootWindowController*> ordered_roots; |
| 370 ordered_roots.insert(ordered_roots.begin(), roots.begin(), roots.end()); | 372 ordered_roots.insert(ordered_roots.begin(), roots.begin(), roots.end()); |
| 371 std::sort(ordered_roots.begin(), ordered_roots.end(), &CompareByDisplayId); | 373 std::sort(ordered_roots.begin(), ordered_roots.end(), &CompareByDisplayId); |
| 372 return ordered_roots; | 374 return ordered_roots; |
| 373 } | 375 } |
| 374 | 376 |
| 375 } // namespace test | 377 } // namespace test |
| 376 } // namespace ash | 378 } // namespace ash |
| OLD | NEW |