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

Unified Diff: chrome/common/service_process_util_unittest.cc

Issue 843113003: MultiProcessTest: Update SpawnChild* to return a Process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/service_process_util_unittest.cc
diff --git a/chrome/common/service_process_util_unittest.cc b/chrome/common/service_process_util_unittest.cc
index 9d54435386560ff86b40de6a88d500a3a10c4261..ec982a83a49e97062042ebc333b4a1a9199c7e7f 100644
--- a/chrome/common/service_process_util_unittest.cc
+++ b/chrome/common/service_process_util_unittest.cc
@@ -94,10 +94,10 @@ void ServiceProcessStateTest::SetUp() {
}
void ServiceProcessStateTest::LaunchAndWait(const std::string& name) {
- base::ProcessHandle handle = SpawnChild(name);
- ASSERT_TRUE(handle);
+ base::Process process = SpawnChild(name);
+ ASSERT_TRUE(process.IsValid());
int exit_code = 0;
- ASSERT_TRUE(base::WaitForExitCode(handle, &exit_code));
+ ASSERT_TRUE(process.WaitForExit(&exit_code));
ASSERT_EQ(exit_code, 0);
}
@@ -187,8 +187,8 @@ TEST_F(ServiceProcessStateTest, DISABLED_SharedMem) {
}
TEST_F(ServiceProcessStateTest, MAYBE_ForceShutdown) {
- base::ProcessHandle handle = SpawnChild("ServiceProcessStateTestShutdown");
- ASSERT_TRUE(handle);
+ base::Process process = SpawnChild("ServiceProcessStateTestShutdown");
+ ASSERT_TRUE(process.IsValid());
for (int i = 0; !CheckServiceProcessReady() && i < 10; ++i) {
base::PlatformThread::Sleep(TestTimeouts::tiny_timeout());
}
@@ -198,9 +198,8 @@ TEST_F(ServiceProcessStateTest, MAYBE_ForceShutdown) {
ASSERT_TRUE(GetServiceProcessData(&version, &pid));
ASSERT_TRUE(ForceServiceProcessShutdown(version, pid));
int exit_code = 0;
- ASSERT_TRUE(base::WaitForExitCodeWithTimeout(handle,
- &exit_code, TestTimeouts::action_max_timeout()));
- base::CloseProcessHandle(handle);
+ ASSERT_TRUE(process.WaitForExitWithTimeout(TestTimeouts::action_max_timeout(),
+ &exit_code));
ASSERT_EQ(exit_code, 0);
}
« no previous file with comments | « chrome/common/multi_process_lock_unittest.cc ('k') | components/browser_watcher/exit_code_watcher_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698