| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 #if defined(OS_WIN) | 119 #if defined(OS_WIN) |
| 120 aura::test::SetUsePopupAsRootWindowForTest(true); | 120 aura::test::SetUsePopupAsRootWindowForTest(true); |
| 121 #endif | 121 #endif |
| 122 ash_test_helper_->SetUp(start_session_); | 122 ash_test_helper_->SetUp(start_session_); |
| 123 | 123 |
| 124 Shell::GetPrimaryRootWindow()->Show(); | 124 Shell::GetPrimaryRootWindow()->Show(); |
| 125 Shell::GetPrimaryRootWindow()->GetDispatcher()->host()->Show(); | 125 Shell::GetPrimaryRootWindow()->GetDispatcher()->host()->Show(); |
| 126 // Move the mouse cursor to far away so that native events doesn't | 126 // Move the mouse cursor to far away so that native events doesn't |
| 127 // interfere test expectations. | 127 // interfere test expectations. |
| 128 Shell::GetPrimaryRootWindow()->MoveCursorTo(gfx::Point(-1000, -1000)); | 128 Shell::GetPrimaryRootWindow()->MoveCursorTo(gfx::Point(-1000, -1000)); |
| 129 ash::Shell::GetInstance()->cursor_manager()->EnableMouseEvents(); | 129 views::corewm::CursorManager::TestApi api( |
| 130 ash::Shell::GetInstance()->cursor_manager()); |
| 131 api.ResetState(); |
| 130 | 132 |
| 131 #if defined(OS_WIN) | 133 #if defined(OS_WIN) |
| 132 if (!command_line->HasSwitch(ash::switches::kForceAshToDesktop)) { | 134 if (!command_line->HasSwitch(ash::switches::kForceAshToDesktop)) { |
| 133 if (base::win::GetVersion() >= base::win::VERSION_WIN8) { | 135 if (base::win::GetVersion() >= base::win::VERSION_WIN8) { |
| 134 ipc_thread_.reset(new base::Thread("test_metro_viewer_ipc_thread")); | 136 ipc_thread_.reset(new base::Thread("test_metro_viewer_ipc_thread")); |
| 135 base::Thread::Options options; | 137 base::Thread::Options options; |
| 136 options.message_loop_type = base::MessageLoop::TYPE_IO; | 138 options.message_loop_type = base::MessageLoop::TYPE_IO; |
| 137 ipc_thread_->StartWithOptions(options); | 139 ipc_thread_->StartWithOptions(options); |
| 138 metro_viewer_host_.reset( | 140 metro_viewer_host_.reset( |
| 139 new TestMetroViewerProcessHost(ipc_thread_->message_loop_proxy())); | 141 new TestMetroViewerProcessHost(ipc_thread_->message_loop_proxy())); |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 | 337 |
| 336 void AshTestBase::UnblockUserSession() { | 338 void AshTestBase::UnblockUserSession() { |
| 337 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); | 339 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); |
| 338 SetSessionStarted(true); | 340 SetSessionStarted(true); |
| 339 SetUserAddingScreenRunning(false); | 341 SetUserAddingScreenRunning(false); |
| 340 } | 342 } |
| 341 | 343 |
| 342 | 344 |
| 343 } // namespace test | 345 } // namespace test |
| 344 } // namespace ash | 346 } // namespace ash |
| OLD | NEW |