| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_base.h" | 5 #include "ash/test/ash_test_base.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 #if defined(OS_WIN) | 117 #if defined(OS_WIN) |
| 118 if (base::win::GetVersion() >= base::win::VERSION_WIN8 && | 118 if (base::win::GetVersion() >= base::win::VERSION_WIN8 && |
| 119 !CommandLine::ForCurrentProcess()->HasSwitch( | 119 !CommandLine::ForCurrentProcess()->HasSwitch( |
| 120 ash::switches::kForceAshToDesktop)) { | 120 ash::switches::kForceAshToDesktop)) { |
| 121 ipc_thread_.reset(new base::Thread("test_metro_viewer_ipc_thread")); | 121 ipc_thread_.reset(new base::Thread("test_metro_viewer_ipc_thread")); |
| 122 base::Thread::Options options; | 122 base::Thread::Options options; |
| 123 options.message_loop_type = base::MessageLoop::TYPE_IO; | 123 options.message_loop_type = base::MessageLoop::TYPE_IO; |
| 124 ipc_thread_->StartWithOptions(options); | 124 ipc_thread_->StartWithOptions(options); |
| 125 | 125 |
| 126 metro_viewer_host_.reset( | 126 metro_viewer_host_.reset( |
| 127 new TestMetroViewerProcessHost("viewer", | 127 new TestMetroViewerProcessHost(ipc_thread_->message_loop_proxy())); |
| 128 ipc_thread_->message_loop_proxy())); | |
| 129 CHECK(metro_viewer_host_->LaunchViewerAndWaitForConnection( | 128 CHECK(metro_viewer_host_->LaunchViewerAndWaitForConnection( |
| 130 win8::test::kDefaultTestAppUserModelId)); | 129 win8::test::kDefaultTestAppUserModelId)); |
| 131 aura::RemoteRootWindowHostWin* root_window_host = | 130 aura::RemoteRootWindowHostWin* root_window_host = |
| 132 aura::RemoteRootWindowHostWin::Instance(); | 131 aura::RemoteRootWindowHostWin::Instance(); |
| 133 CHECK(root_window_host != NULL); | 132 CHECK(root_window_host != NULL); |
| 134 } | 133 } |
| 135 #endif | 134 #endif |
| 136 } | 135 } |
| 137 | 136 |
| 138 void AshTestBase::TearDown() { | 137 void AshTestBase::TearDown() { |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 SetHasActiveUser(user_logged_in); | 271 SetHasActiveUser(user_logged_in); |
| 273 } | 272 } |
| 274 | 273 |
| 275 void AshTestBase::SetCanLockScreen(bool can_lock_screen) { | 274 void AshTestBase::SetCanLockScreen(bool can_lock_screen) { |
| 276 ash_test_helper_->test_shell_delegate()->test_session_state_delegate()-> | 275 ash_test_helper_->test_shell_delegate()->test_session_state_delegate()-> |
| 277 SetCanLockScreen(can_lock_screen); | 276 SetCanLockScreen(can_lock_screen); |
| 278 } | 277 } |
| 279 | 278 |
| 280 } // namespace test | 279 } // namespace test |
| 281 } // namespace ash | 280 } // namespace ash |
| OLD | NEW |