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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 if (!command_line->HasSwitch(switches::kAshHostWindowBounds)) { | 114 if (!command_line->HasSwitch(switches::kAshHostWindowBounds)) { |
115 command_line->AppendSwitchASCII( | 115 command_line->AppendSwitchASCII( |
116 switches::kAshHostWindowBounds, "1+1-800x600"); | 116 switches::kAshHostWindowBounds, "1+1-800x600"); |
117 } | 117 } |
118 #if defined(OS_WIN) | 118 #if defined(OS_WIN) |
119 aura::test::SetUsePopupAsRootWindowForTest(true); | 119 aura::test::SetUsePopupAsRootWindowForTest(true); |
120 #endif | 120 #endif |
121 ash_test_helper_->SetUp(start_session_); | 121 ash_test_helper_->SetUp(start_session_); |
122 | 122 |
123 Shell::GetPrimaryRootWindow()->Show(); | 123 Shell::GetPrimaryRootWindow()->Show(); |
124 Shell::GetPrimaryRootWindow()->GetDispatcher()->ShowRootWindow(); | 124 Shell::GetPrimaryRootWindow()->GetDispatcher()->host()->Show(); |
125 // Move the mouse cursor to far away so that native events doesn't | 125 // Move the mouse cursor to far away so that native events doesn't |
126 // interfere test expectations. | 126 // interfere test expectations. |
127 Shell::GetPrimaryRootWindow()->MoveCursorTo(gfx::Point(-1000, -1000)); | 127 Shell::GetPrimaryRootWindow()->MoveCursorTo(gfx::Point(-1000, -1000)); |
128 ash::Shell::GetInstance()->cursor_manager()->EnableMouseEvents(); | 128 ash::Shell::GetInstance()->cursor_manager()->EnableMouseEvents(); |
129 | 129 |
130 #if defined(OS_WIN) | 130 #if defined(OS_WIN) |
131 if (base::win::GetVersion() >= base::win::VERSION_WIN8 && | 131 if (base::win::GetVersion() >= base::win::VERSION_WIN8 && |
132 !command_line->HasSwitch(ash::switches::kForceAshToDesktop)) { | 132 !command_line->HasSwitch(ash::switches::kForceAshToDesktop)) { |
133 ipc_thread_.reset(new base::Thread("test_metro_viewer_ipc_thread")); | 133 ipc_thread_.reset(new base::Thread("test_metro_viewer_ipc_thread")); |
134 base::Thread::Options options; | 134 base::Thread::Options options; |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 | 333 |
334 void AshTestBase::UnblockUserSession() { | 334 void AshTestBase::UnblockUserSession() { |
335 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); | 335 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); |
336 SetSessionStarted(true); | 336 SetSessionStarted(true); |
337 SetUserAddingScreenRunning(false); | 337 SetUserAddingScreenRunning(false); |
338 } | 338 } |
339 | 339 |
340 | 340 |
341 } // namespace test | 341 } // namespace test |
342 } // namespace ash | 342 } // namespace ash |
OLD | NEW |