Index: sandbox/mac/xpc_message_server_unittest.cc |
diff --git a/sandbox/mac/xpc_message_server_unittest.cc b/sandbox/mac/xpc_message_server_unittest.cc |
index 734096cda1fa337e34784d0baaa7f5ba20718b0d..4e681fb179e3b09cecdc6ba1776ccb6a70487ae6 100644 |
--- a/sandbox/mac/xpc_message_server_unittest.cc |
+++ b/sandbox/mac/xpc_message_server_unittest.cc |
@@ -149,21 +149,19 @@ XPC_TEST_F(GetSenderPID) // { |
#pragma GCC diagnostic pop |
ASSERT_EQ(KERN_SUCCESS, kr); |
- base::ProcessHandle child_handle = base::SpawnMultiProcessTestChild( |
+ base::Process child = base::SpawnMultiProcessTestChild( |
"GetSenderPID", |
base::GetMultiProcessTestChildBaseCommandLine(), |
base::LaunchOptions()); |
- ASSERT_NE(base::kNullProcessHandle, child_handle); |
+ ASSERT_TRUE(child.IsValid()); |
int exit_code = -1; |
- ASSERT_TRUE(base::WaitForExitCode(child_handle, &exit_code)); |
+ ASSERT_TRUE(child.WaitForExit(&exit_code)); |
EXPECT_EQ(0, exit_code); |
- EXPECT_EQ(base::GetProcId(child_handle), sender_pid); |
- EXPECT_EQ(base::GetProcId(child_handle), child_pid); |
+ EXPECT_EQ(child.pid(), sender_pid); |
+ EXPECT_EQ(child.pid(), child_pid); |
EXPECT_EQ(sender_pid, child_pid); |
- |
- base::CloseProcessHandle(child_handle); |
} |
MULTIPROCESS_TEST_MAIN(GetSenderPID) { |