| 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.h" | 7 #include "ash/accelerators/accelerator_controller.h" |
| 8 #include "ash/ash_switches.h" | 8 #include "ash/ash_switches.h" |
| 9 #include "ash/display/display_info.h" | 9 #include "ash/display/display_info.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
| 22 #include "ui/aura/env.h" | 22 #include "ui/aura/env.h" |
| 23 #include "ui/aura/input_state_lookup.h" | 23 #include "ui/aura/input_state_lookup.h" |
| 24 #include "ui/aura/test/env_test_helper.h" | 24 #include "ui/aura/test/env_test_helper.h" |
| 25 #include "ui/aura/test/event_generator_delegate_aura.h" | 25 #include "ui/aura/test/event_generator_delegate_aura.h" |
| 26 #include "ui/base/ime/input_method_initializer.h" | 26 #include "ui/base/ime/input_method_initializer.h" |
| 27 #include "ui/compositor/scoped_animation_duration_scale_mode.h" | 27 #include "ui/compositor/scoped_animation_duration_scale_mode.h" |
| 28 #include "ui/compositor/test/context_factories_for_test.h" | 28 #include "ui/compositor/test/context_factories_for_test.h" |
| 29 #include "ui/message_center/message_center.h" | 29 #include "ui/message_center/message_center.h" |
| 30 #include "ui/wm/core/capture_controller.h" | 30 #include "ui/wm/core/capture_controller.h" |
| 31 #include "ui/wm/core/cursor_manager.h" |
| 31 | 32 |
| 32 #if defined(OS_CHROMEOS) | 33 #if defined(OS_CHROMEOS) |
| 33 #include "chromeos/audio/cras_audio_handler.h" | 34 #include "chromeos/audio/cras_audio_handler.h" |
| 34 #include "chromeos/dbus/dbus_thread_manager.h" | 35 #include "chromeos/dbus/dbus_thread_manager.h" |
| 35 #include "device/bluetooth/dbus/bluez_dbus_manager.h" | 36 #include "device/bluetooth/dbus/bluez_dbus_manager.h" |
| 36 #endif | 37 #endif |
| 37 | 38 |
| 38 #if defined(OS_WIN) | 39 #if defined(OS_WIN) |
| 39 #include "base/win/windows_version.h" | 40 #include "base/win/windows_version.h" |
| 40 #endif | 41 #endif |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 // created in AshTestBase tests. | 107 // created in AshTestBase tests. |
| 107 chromeos::CrasAudioHandler::InitializeForTesting(); | 108 chromeos::CrasAudioHandler::InitializeForTesting(); |
| 108 #endif | 109 #endif |
| 109 ShellContentState* content_state = content_state_; | 110 ShellContentState* content_state = content_state_; |
| 110 if (!content_state) { | 111 if (!content_state) { |
| 111 test_shell_content_state_ = new TestShellContentState; | 112 test_shell_content_state_ = new TestShellContentState; |
| 112 content_state = test_shell_content_state_; | 113 content_state = test_shell_content_state_; |
| 113 } | 114 } |
| 114 ShellContentState::SetInstance(content_state); | 115 ShellContentState::SetInstance(content_state); |
| 115 | 116 |
| 117 // Reset the global state for the cursor manager. This includes the |
| 118 // last cursor visibility state, etc. |
| 119 wm::CursorManager::ResetCursorVisibilityStateForTest(); |
| 120 |
| 116 ShellInitParams init_params; | 121 ShellInitParams init_params; |
| 117 init_params.delegate = test_shell_delegate_; | 122 init_params.delegate = test_shell_delegate_; |
| 118 init_params.context_factory = context_factory; | 123 init_params.context_factory = context_factory; |
| 119 init_params.blocking_pool = content::BrowserThread::GetBlockingPool(); | 124 init_params.blocking_pool = content::BrowserThread::GetBlockingPool(); |
| 120 ash::Shell::CreateInstance(init_params); | 125 ash::Shell::CreateInstance(init_params); |
| 121 aura::test::EnvTestHelper(aura::Env::GetInstance()) | 126 aura::test::EnvTestHelper(aura::Env::GetInstance()) |
| 122 .SetInputStateLookup(std::unique_ptr<aura::InputStateLookup>()); | 127 .SetInputStateLookup(std::unique_ptr<aura::InputStateLookup>()); |
| 123 | 128 |
| 124 Shell* shell = Shell::GetInstance(); | 129 Shell* shell = Shell::GetInstance(); |
| 125 if (start_session) { | 130 if (start_session) { |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 bool AshTestHelper::SupportsHostWindowResize() { | 209 bool AshTestHelper::SupportsHostWindowResize() { |
| 205 #if defined(OS_WIN) | 210 #if defined(OS_WIN) |
| 206 return false; | 211 return false; |
| 207 #else | 212 #else |
| 208 return true; | 213 return true; |
| 209 #endif | 214 #endif |
| 210 } | 215 } |
| 211 | 216 |
| 212 } // namespace test | 217 } // namespace test |
| 213 } // namespace ash | 218 } // namespace ash |
| OLD | NEW |