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); |
} |