| 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/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/test/test_session_state_delegate.h" | 10 #include "ash/common/test/test_session_state_delegate.h" |
| 11 #include "ash/common/test/test_system_tray_delegate.h" | 11 #include "ash/common/test/test_system_tray_delegate.h" |
| 12 #include "ash/common/wm_shell.h" | 12 #include "ash/common/wm_shell.h" |
| 13 #include "ash/shell.h" | 13 #include "ash/shell.h" |
| 14 #include "ash/shell_init_params.h" | 14 #include "ash/shell_init_params.h" |
| 15 #include "ash/test/ash_test_environment.h" | 15 #include "ash/test/ash_test_environment.h" |
| 16 #include "ash/test/ash_test_views_delegate.h" | 16 #include "ash/test/ash_test_views_delegate.h" |
| 17 #include "ash/test/display_manager_test_api.h" | |
| 18 #include "ash/test/shell_test_api.h" | 17 #include "ash/test/shell_test_api.h" |
| 19 #include "ash/test/test_screenshot_delegate.h" | 18 #include "ash/test/test_screenshot_delegate.h" |
| 20 #include "ash/test/test_shell_delegate.h" | 19 #include "ash/test/test_shell_delegate.h" |
| 21 #include "base/run_loop.h" | 20 #include "base/run_loop.h" |
| 22 #include "ui/aura/env.h" | 21 #include "ui/aura/env.h" |
| 23 #include "ui/aura/input_state_lookup.h" | 22 #include "ui/aura/input_state_lookup.h" |
| 24 #include "ui/aura/test/env_test_helper.h" | 23 #include "ui/aura/test/env_test_helper.h" |
| 25 #include "ui/aura/test/event_generator_delegate_aura.h" | 24 #include "ui/aura/test/event_generator_delegate_aura.h" |
| 26 #include "ui/base/ime/input_method_initializer.h" | 25 #include "ui/base/ime/input_method_initializer.h" |
| 27 #include "ui/base/material_design/material_design_controller.h" | 26 #include "ui/base/material_design/material_design_controller.h" |
| 28 #include "ui/base/test/material_design_controller_test_api.h" | 27 #include "ui/base/test/material_design_controller_test_api.h" |
| 29 #include "ui/compositor/scoped_animation_duration_scale_mode.h" | 28 #include "ui/compositor/scoped_animation_duration_scale_mode.h" |
| 30 #include "ui/compositor/test/context_factories_for_test.h" | 29 #include "ui/compositor/test/context_factories_for_test.h" |
| 31 #include "ui/display/manager/managed_display_info.h" | 30 #include "ui/display/manager/managed_display_info.h" |
| 31 #include "ui/display/test/display_manager_test_api.h" |
| 32 #include "ui/message_center/message_center.h" | 32 #include "ui/message_center/message_center.h" |
| 33 #include "ui/wm/core/capture_controller.h" | 33 #include "ui/wm/core/capture_controller.h" |
| 34 #include "ui/wm/core/cursor_manager.h" | 34 #include "ui/wm/core/cursor_manager.h" |
| 35 | 35 |
| 36 #if defined(OS_CHROMEOS) | 36 #if defined(OS_CHROMEOS) |
| 37 #include "ash/system/chromeos/screen_layout_observer.h" | 37 #include "ash/system/chromeos/screen_layout_observer.h" |
| 38 #include "chromeos/audio/cras_audio_handler.h" | 38 #include "chromeos/audio/cras_audio_handler.h" |
| 39 #include "chromeos/dbus/dbus_thread_manager.h" | 39 #include "chromeos/dbus/dbus_thread_manager.h" |
| 40 #include "device/bluetooth/bluetooth_adapter_factory.h" | 40 #include "device/bluetooth/bluetooth_adapter_factory.h" |
| 41 #include "device/bluetooth/dbus/bluez_dbus_manager.h" | 41 #include "device/bluetooth/dbus/bluez_dbus_manager.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 GetTestSessionStateDelegate()->SetActiveUserSessionStarted(true); | 137 GetTestSessionStateDelegate()->SetActiveUserSessionStarted(true); |
| 138 GetTestSessionStateDelegate()->SetHasActiveUser(true); | 138 GetTestSessionStateDelegate()->SetHasActiveUser(true); |
| 139 } | 139 } |
| 140 | 140 |
| 141 #if defined(OS_CHROMEOS) | 141 #if defined(OS_CHROMEOS) |
| 142 // Tests that change the display configuration generally don't care about the | 142 // Tests that change the display configuration generally don't care about the |
| 143 // notifications and the popup UI can interfere with things like cursors. | 143 // notifications and the popup UI can interfere with things like cursors. |
| 144 shell->screen_layout_observer()->set_show_notifications_for_testing(false); | 144 shell->screen_layout_observer()->set_show_notifications_for_testing(false); |
| 145 #endif | 145 #endif |
| 146 | 146 |
| 147 test::DisplayManagerTestApi(Shell::GetInstance()->display_manager()) | 147 display::test::DisplayManagerTestApi(Shell::GetInstance()->display_manager()) |
| 148 .DisableChangeDisplayUponHostResize(); | 148 .DisableChangeDisplayUponHostResize(); |
| 149 ShellTestApi(shell).DisableDisplayAnimator(); | 149 ShellTestApi(shell).DisableDisplayAnimator(); |
| 150 | 150 |
| 151 test_screenshot_delegate_ = new TestScreenshotDelegate(); | 151 test_screenshot_delegate_ = new TestScreenshotDelegate(); |
| 152 shell->accelerator_controller_delegate()->SetScreenshotDelegate( | 152 shell->accelerator_controller_delegate()->SetScreenshotDelegate( |
| 153 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_)); | 153 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_)); |
| 154 } | 154 } |
| 155 | 155 |
| 156 void AshTestHelper::TearDown() { | 156 void AshTestHelper::TearDown() { |
| 157 // Tear down the shell. | 157 // Tear down the shell. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 bool AshTestHelper::SupportsMultipleDisplays() { | 214 bool AshTestHelper::SupportsMultipleDisplays() { |
| 215 #if defined(OS_WIN) | 215 #if defined(OS_WIN) |
| 216 return false; | 216 return false; |
| 217 #else | 217 #else |
| 218 return true; | 218 return true; |
| 219 #endif | 219 #endif |
| 220 } | 220 } |
| 221 | 221 |
| 222 } // namespace test | 222 } // namespace test |
| 223 } // namespace ash | 223 } // namespace ash |
| OLD | NEW |