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

Unified Diff: sandbox/mac/xpc_message_server_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
« no previous file with comments | « sandbox/mac/bootstrap_sandbox_unittest.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « sandbox/mac/bootstrap_sandbox_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698