Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Side by Side Diff: ash/test/ash_test_base.cc

Issue 584213002: Only do aggressive metro viewer termination in tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
181 // Clean up any dangling viewer processes as the metro APIs sometimes leave 182 // 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 // 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 // following command line arg so use that to avoid killing all processes named
184 // win8::test::kDefaultTestExePath. 185 // win8::test::kDefaultTestExePath.
185 const wchar_t kViewerProcessArgument[] = L"DefaultBrowserServer"; 186 const wchar_t kViewerProcessArgument[] = L"DefaultBrowserServer";
186 base::KillAllNamedProcessesWithArgument(win8::test::kDefaultTestExePath, 187 base::KillAllNamedProcessesWithArgument(win8::test::kDefaultTestExePath,
187 kViewerProcessArgument); 188 kViewerProcessArgument);
188 #endif 189 #endif
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 337
337 void AshTestBase::UnblockUserSession() { 338 void AshTestBase::UnblockUserSession() {
338 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); 339 Shell::GetInstance()->session_state_delegate()->UnlockScreen();
339 SetSessionStarted(true); 340 SetSessionStarted(true);
340 SetUserAddingScreenRunning(false); 341 SetUserAddingScreenRunning(false);
341 } 342 }
342 343
343 344
344 } // namespace test 345 } // namespace test
345 } // namespace ash 346 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/test/test_metro_viewer_process_host.h » ('j') | win8/viewer/metro_viewer_process_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698