Index: mojo/edk/test/multiprocess_test_helper.cc |
diff --git a/mojo/edk/test/multiprocess_test_helper.cc b/mojo/edk/test/multiprocess_test_helper.cc |
index 8eaccf08d6d63bcb4cec91bfc0074866d01ae207..7fb7be716f6f873515492328c2e6cb2ee0704775 100644 |
--- a/mojo/edk/test/multiprocess_test_helper.cc |
+++ b/mojo/edk/test/multiprocess_test_helper.cc |
@@ -34,6 +34,8 @@ |
#include "base/win/windows_version.h" |
#elif defined(OS_MACOSX) && !defined(OS_IOS) |
#include "base/mac/mach_port_broker.h" |
+#elif defined(OS_ANDROID) |
+// #include "base/android/parcelable_channel.h" |
#endif |
namespace mojo { |
@@ -160,15 +162,25 @@ ScopedMessagePipeHandle MultiprocessTestHelper::StartChildWithExtraSwitch( |
pipe = ConnectToPeerProcess(std::move(server_handle), peer_token_); |
} |
- test_child_ = |
+ base::SpawnChildResult result = |
base::SpawnMultiProcessTestChild(test_child_main, command_line, options); |
+ test_child_ = std::move(result.process); |
if (launch_type == LaunchType::CHILD || launch_type == LaunchType::PEER) |
channel.ChildProcessLaunched(); |
if (launch_type == LaunchType::CHILD || |
launch_type == LaunchType::NAMED_CHILD) { |
DCHECK(server_handle.is_valid()); |
- process.Connect(test_child_.Handle(), std::move(server_handle), |
+#if defined(OS_ANDROID) |
+ ConnectionParam connection_param(std::move(server_handle), |
+ base::android::ParcelableChannelClient( |
+ result.parcelable_channel_client), |
+ base::android::ParcelableChannelServer( |
+ result.parcelable_channel_server)); |
+#else |
+ ConnectionParam connection_param(std::move(server_handle)); |
+#endif |
+ process.Connect(test_child_.Handle(), std::move(connection_param), |
process_error_callback_); |
} |