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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 ash::switches::kForceAshToDesktop)) { | 169 ash::switches::kForceAshToDesktop)) { |
170 // Check that our viewer connection is still established. | 170 // Check that our viewer connection is still established. |
171 CHECK(!metro_viewer_host_->closed_unexpectedly()); | 171 CHECK(!metro_viewer_host_->closed_unexpectedly()); |
172 } | 172 } |
173 #endif | 173 #endif |
174 | 174 |
175 ash_test_helper_->TearDown(); | 175 ash_test_helper_->TearDown(); |
176 #if defined(OS_WIN) | 176 #if defined(OS_WIN) |
177 ui::test::SetUsePopupAsRootWindowForTest(false); | 177 ui::test::SetUsePopupAsRootWindowForTest(false); |
178 // Kill the viewer process if we spun one up. | 178 // Kill the viewer process if we spun one up. |
| 179 metro_viewer_host_->TerminateViewer(); |
179 metro_viewer_host_.reset(); | 180 metro_viewer_host_.reset(); |
180 | |
181 // Clean up any dangling viewer processes as the metro APIs sometimes leave | |
182 // zombies behind. A default browser process in metro will have the | |
183 // following command line arg so use that to avoid killing all processes named | |
184 // win8::test::kDefaultTestExePath. | |
185 const wchar_t kViewerProcessArgument[] = L"DefaultBrowserServer"; | |
186 base::KillAllNamedProcessesWithArgument(win8::test::kDefaultTestExePath, | |
187 kViewerProcessArgument); | |
188 #endif | 181 #endif |
189 | 182 |
190 event_generator_.reset(); | 183 event_generator_.reset(); |
191 // Some tests set an internal display id, | 184 // Some tests set an internal display id, |
192 // reset it here, so other tests will continue in a clean environment. | 185 // reset it here, so other tests will continue in a clean environment. |
193 gfx::Display::SetInternalDisplayId(gfx::Display::kInvalidDisplayID); | 186 gfx::Display::SetInternalDisplayId(gfx::Display::kInvalidDisplayID); |
194 } | 187 } |
195 | 188 |
196 ui::test::EventGenerator& AshTestBase::GetEventGenerator() { | 189 ui::test::EventGenerator& AshTestBase::GetEventGenerator() { |
197 if (!event_generator_) { | 190 if (!event_generator_) { |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 | 329 |
337 void AshTestBase::UnblockUserSession() { | 330 void AshTestBase::UnblockUserSession() { |
338 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); | 331 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); |
339 SetSessionStarted(true); | 332 SetSessionStarted(true); |
340 SetUserAddingScreenRunning(false); | 333 SetUserAddingScreenRunning(false); |
341 } | 334 } |
342 | 335 |
343 | 336 |
344 } // namespace test | 337 } // namespace test |
345 } // namespace ash | 338 } // namespace ash |
OLD | NEW |