OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 "chrome/test/ui/ui_test.h" | 5 #include "chrome/test/ui/ui_test.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/base_switches.h" | 10 #include "base/base_switches.h" |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 #endif | 413 #endif |
414 if (!base::WaitForSingleProcess(process_, timeout)) { | 414 if (!base::WaitForSingleProcess(process_, timeout)) { |
415 // We need to force the browser to quit because it didn't quit fast | 415 // We need to force the browser to quit because it didn't quit fast |
416 // enough. Take no chance and kill every chrome processes. | 416 // enough. Take no chance and kill every chrome processes. |
417 CleanupAppProcesses(); | 417 CleanupAppProcesses(); |
418 } | 418 } |
419 } | 419 } |
420 | 420 |
421 // Don't forget to close the handle | 421 // Don't forget to close the handle |
422 base::CloseProcessHandle(process_); | 422 base::CloseProcessHandle(process_); |
423 process_ = NULL; | 423 process_ = base::kNullProcessHandle; |
424 } | 424 } |
425 | 425 |
426 void UITest::AssertAppNotRunning(const std::wstring& error_message) { | 426 void UITest::AssertAppNotRunning(const std::wstring& error_message) { |
427 std::wstring final_error_message(error_message); | 427 std::wstring final_error_message(error_message); |
428 | 428 |
429 int process_count = GetBrowserProcessCount(); | 429 int process_count = GetBrowserProcessCount(); |
430 if (process_count > 0) { | 430 if (process_count > 0) { |
431 ChromeProcessList processes = GetRunningChromeProcesses(user_data_dir()); | 431 ChromeProcessList processes = GetRunningChromeProcesses(user_data_dir()); |
432 final_error_message += L" Leftover PIDs: ["; | 432 final_error_message += L" Leftover PIDs: ["; |
433 for (ChromeProcessList::const_iterator it = processes.begin(); | 433 for (ChromeProcessList::const_iterator it = processes.begin(); |
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1133 #else | 1133 #else |
1134 // TODO(port): above code is very Windows-specific; we need to | 1134 // TODO(port): above code is very Windows-specific; we need to |
1135 // figure out and abstract out how we'll handle finding any existing | 1135 // figure out and abstract out how we'll handle finding any existing |
1136 // running process, etc. on other platforms. | 1136 // running process, etc. on other platforms. |
1137 NOTIMPLEMENTED(); | 1137 NOTIMPLEMENTED(); |
1138 #endif | 1138 #endif |
1139 } | 1139 } |
1140 | 1140 |
1141 return true; | 1141 return true; |
1142 } | 1142 } |
OLD | NEW |