Chromium Code Reviews| Index: sandbox/mac/bootstrap_sandbox_unittest.mm |
| diff --git a/sandbox/mac/bootstrap_sandbox_unittest.mm b/sandbox/mac/bootstrap_sandbox_unittest.mm |
| index a6225a91c32ab07531624057ddcd96dd9dc17d2a..ea5fe7d18234b90ce3c76481cfc281fe28f1bb67 100644 |
| --- a/sandbox/mac/bootstrap_sandbox_unittest.mm |
| +++ b/sandbox/mac/bootstrap_sandbox_unittest.mm |
| @@ -104,13 +104,14 @@ class BootstrapSandboxTest : public base::MultiProcessTest { |
| base::LaunchOptions options; |
| options.pre_exec_delegate = pre_exec_delegate.get(); |
| - base::Process process = SpawnChildWithOptions(child_name, options); |
| - ASSERT_TRUE(process.IsValid()); |
| + base::SpawnChildResult spawn_child = |
| + SpawnChildWithOptions(child_name, options); |
| + ASSERT_TRUE(spawn_child.process.IsValid()); |
| int code = 0; |
| - EXPECT_TRUE(process.WaitForExit(&code)); |
| + EXPECT_TRUE(spawn_child.process.WaitForExit(&code)); |
| EXPECT_EQ(0, code); |
| if (out_pid) |
| - *out_pid = process.Pid(); |
| + *out_pid = spawn_child.process.Pid(); |
| } |
| protected: |
| @@ -124,15 +125,15 @@ TEST_F(BootstrapSandboxTest, DistributedNotifications_Unsandboxed) { |
| base::scoped_nsobject<DistributedNotificationObserver> observer( |
| [[DistributedNotificationObserver alloc] init]); |
| - base::Process process = SpawnChild(kNotificationTestMain); |
| - ASSERT_TRUE(process.IsValid()); |
| + base::SpawnChildResult spawn_child = SpawnChild(kNotificationTestMain); |
| + ASSERT_TRUE(spawn_child.process.IsValid()); |
| int code = 0; |
| - EXPECT_TRUE(process.WaitForExit(&code)); |
| + EXPECT_TRUE(spawn_child.process.WaitForExit(&code)); |
| EXPECT_EQ(0, code); |
| [observer waitForNotification]; |
| EXPECT_EQ(1, [observer receivedCount]); |
| - EXPECT_EQ(process.Pid(), [[observer object] intValue]); |
| + EXPECT_EQ(spawn_child.process.Pid(), [[observer object] intValue]); |
| } |
| // Run the test with the sandbox enabled without notifications on the policy |
| @@ -471,7 +472,9 @@ TEST_F(BootstrapSandboxTest, ChildOutliveSandbox) { |
| sandbox_->NewClient(kTestPolicyId)); |
| base::LaunchOptions options; |
| options.pre_exec_delegate = pre_exec_delegate.get(); |
| - base::Process process = SpawnChildWithOptions("ChildOutliveSandbox", options); |
| + base::SpawnChildResult spawn_result = |
| + SpawnChildWithOptions("ChildOutliveSandbox", options); |
| + base::Process process = std::move(spawn_result.process); |
| ASSERT_TRUE(process.IsValid()); |
|
dcheng
2017/03/14 05:28:51
Ditto
Jay Civelli
2017/03/14 16:29:13
Done.
|
| // Synchronize with the child. |