| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 if (!command_line->HasSwitch(ash::switches::kForceAshToDesktop)) { | 133 if (!command_line->HasSwitch(ash::switches::kForceAshToDesktop)) { |
| 134 if (base::win::GetVersion() >= base::win::VERSION_WIN8) { | 134 if (base::win::GetVersion() >= base::win::VERSION_WIN8) { |
| 135 ipc_thread_.reset(new base::Thread("test_metro_viewer_ipc_thread")); | 135 ipc_thread_.reset(new base::Thread("test_metro_viewer_ipc_thread")); |
| 136 base::Thread::Options options; | 136 base::Thread::Options options; |
| 137 options.message_loop_type = base::MessageLoop::TYPE_IO; | 137 options.message_loop_type = base::MessageLoop::TYPE_IO; |
| 138 ipc_thread_->StartWithOptions(options); | 138 ipc_thread_->StartWithOptions(options); |
| 139 metro_viewer_host_.reset( | 139 metro_viewer_host_.reset( |
| 140 new TestMetroViewerProcessHost(ipc_thread_->message_loop_proxy())); | 140 new TestMetroViewerProcessHost(ipc_thread_->message_loop_proxy())); |
| 141 CHECK(metro_viewer_host_->LaunchViewerAndWaitForConnection( | 141 CHECK(metro_viewer_host_->LaunchViewerAndWaitForConnection( |
| 142 win8::test::kDefaultTestAppUserModelId)); | 142 win8::test::kDefaultTestAppUserModelId)); |
| 143 aura::RemoteRootWindowHostWin* root_window_host = | 143 aura::RemoteWindowTreeHostWin* root_window_host = |
| 144 aura::RemoteRootWindowHostWin::Instance(); | 144 aura::RemoteWindowTreeHostWin::Instance(); |
| 145 CHECK(root_window_host != NULL); | 145 CHECK(root_window_host != NULL); |
| 146 } | 146 } |
| 147 ash::WindowPositioner::SetMaximizeFirstWindow(true); | 147 ash::WindowPositioner::SetMaximizeFirstWindow(true); |
| 148 } | 148 } |
| 149 #endif | 149 #endif |
| 150 } | 150 } |
| 151 | 151 |
| 152 void AshTestBase::TearDown() { | 152 void AshTestBase::TearDown() { |
| 153 teardown_called_ = true; | 153 teardown_called_ = true; |
| 154 // Flush the message loop to finish pending release tasks. | 154 // Flush the message loop to finish pending release tasks. |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 | 337 |
| 338 void AshTestBase::UnblockUserSession() { | 338 void AshTestBase::UnblockUserSession() { |
| 339 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); | 339 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); |
| 340 SetSessionStarted(true); | 340 SetSessionStarted(true); |
| 341 SetUserAddingScreenRunning(false); | 341 SetUserAddingScreenRunning(false); |
| 342 } | 342 } |
| 343 | 343 |
| 344 | 344 |
| 345 } // namespace test | 345 } // namespace test |
| 346 } // namespace ash | 346 } // namespace ash |
| OLD | NEW |