OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "mojo/edk/test/multiprocess_test_helper.h" | 5 #include "mojo/edk/test/multiprocess_test_helper.h" |
6 | 6 |
7 #include <functional> | 7 #include <functional> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 } | 161 } |
162 | 162 |
163 test_child_ = | 163 test_child_ = |
164 base::SpawnMultiProcessTestChild(test_child_main, command_line, options); | 164 base::SpawnMultiProcessTestChild(test_child_main, command_line, options); |
165 if (launch_type == LaunchType::CHILD || launch_type == LaunchType::PEER) | 165 if (launch_type == LaunchType::CHILD || launch_type == LaunchType::PEER) |
166 channel.ChildProcessLaunched(); | 166 channel.ChildProcessLaunched(); |
167 | 167 |
168 if (launch_type == LaunchType::CHILD || | 168 if (launch_type == LaunchType::CHILD || |
169 launch_type == LaunchType::NAMED_CHILD) { | 169 launch_type == LaunchType::NAMED_CHILD) { |
170 DCHECK(server_handle.is_valid()); | 170 DCHECK(server_handle.is_valid()); |
171 process.Connect(test_child_.Handle(), std::move(server_handle), | 171 process.Connect(test_child_.Handle(), |
| 172 ConnectionParams(std::move(server_handle)), |
172 process_error_callback_); | 173 process_error_callback_); |
173 } | 174 } |
174 | 175 |
175 CHECK(test_child_.IsValid()); | 176 CHECK(test_child_.IsValid()); |
176 return pipe; | 177 return pipe; |
177 } | 178 } |
178 | 179 |
179 int MultiprocessTestHelper::WaitForChildShutdown() { | 180 int MultiprocessTestHelper::WaitForChildShutdown() { |
180 CHECK(test_child_.IsValid()); | 181 CHECK(test_child_.IsValid()); |
181 | 182 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 ::testing::Test::HasNonfatalFailure()) ? 1 : 0; | 247 ::testing::Test::HasNonfatalFailure()) ? 1 : 0; |
247 }); | 248 }); |
248 } | 249 } |
249 | 250 |
250 // static | 251 // static |
251 mojo::ScopedMessagePipeHandle MultiprocessTestHelper::primordial_pipe; | 252 mojo::ScopedMessagePipeHandle MultiprocessTestHelper::primordial_pipe; |
252 | 253 |
253 } // namespace test | 254 } // namespace test |
254 } // namespace edk | 255 } // namespace edk |
255 } // namespace mojo | 256 } // namespace mojo |
OLD | NEW |