From 896012863947ba511c55ce7c65aa1002cd3894eb Mon Sep 17 00:00:00 2001 From: tsergeant Date: Wed, 9 Mar 2016 19:51:33 -0800 Subject: Revert of Fix failing tests with ChannelMojo enabled. (patchset #3 id:300001 of https://codereview.chromium.org/1768903002/ ) Reason for revert: This CL is causing failures in ipc_mojo_unittests. See: https://build.chromium.org/p/chromium.linux/builders/Linux%20Tests%20%28dbg%29%281%29/builds/52715 https://build.chromium.org/p/chromium.linux/builders/Linux%20Tests%20%28dbg%29%281%29%2832%29/builds/26588 Original issue's description: > Fix failing tests with ChannelMojo enabled. > > This ChannelMojo to: > - take a ScopedMessagePipeHandle instead of a string token so an > in-process renderer can be passed the message pipe directly; > - send brokered attachments as mojo handles; and > - offer messages to AttachmentBroker. > > This also fixes and re-enables ipc_channel_mojo_unittest.cc. > > BUG=579813 > > Committed: https://crrev.com/013cfed7ecf91b0700bec7147631d4fbedb6b64e > Cr-Commit-Position: refs/heads/master@{#380294} TBR=rockot@chromium.org,tsepez@chromium.org,ben@chromium.org,sammc@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=579813 Review URL: https://codereview.chromium.org/1784773002 Cr-Commit-Position: refs/heads/master@{#380325} --- ipc/mojo/ipc_mojo_bootstrap_unittest.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ipc/mojo/ipc_mojo_bootstrap_unittest.cc') diff --git a/ipc/mojo/ipc_mojo_bootstrap_unittest.cc b/ipc/mojo/ipc_mojo_bootstrap_unittest.cc index 66ccdea..efd2b80 100644 --- a/ipc/mojo/ipc_mojo_bootstrap_unittest.cc +++ b/ipc/mojo/ipc_mojo_bootstrap_unittest.cc @@ -57,6 +57,8 @@ void TestingDelegate::OnBootstrapError() { quit_callback_.Run(); } +const char kMojoChannelToken[] = "IPCMojoBootstrapTest token"; + // Times out on Android; see http://crbug.com/502290 #if defined(OS_ANDROID) #define MAYBE_Connect DISABLED_Connect @@ -67,10 +69,9 @@ TEST_F(IPCMojoBootstrapTest, MAYBE_Connect) { base::MessageLoop message_loop; base::RunLoop run_loop; TestingDelegate delegate(run_loop.QuitClosure()); - RUN_CHILD_ON_PIPE(IPCMojoBootstrapTestClient, pipe) scoped_ptr bootstrap = IPC::MojoBootstrap::Create( - mojo::MakeScopedHandle(mojo::MessagePipeHandle(pipe)), - IPC::Channel::MODE_SERVER, &delegate); + kMojoChannelToken, IPC::Channel::MODE_SERVER, &delegate); + RUN_CHILD_ON_PIPE(IPCMojoBootstrapTestClient, unused_pipe) bootstrap->Connect(); run_loop.Run(); @@ -91,14 +92,13 @@ namespace { // A long running process that connects to us. DEFINE_TEST_CLIENT_TEST_WITH_PIPE(IPCMojoBootstrapTestClient, - IPCMojoBootstrapTest, - pipe) { + IPCMojoBootstrapTest, + unused_pipe) { base::MessageLoop message_loop; base::RunLoop run_loop; TestingDelegate delegate(run_loop.QuitClosure()); scoped_ptr bootstrap = IPC::MojoBootstrap::Create( - mojo::MakeScopedHandle(mojo::MessagePipeHandle(pipe)), - IPC::Channel::MODE_CLIENT, &delegate); + kMojoChannelToken, IPC::Channel::MODE_CLIENT, &delegate); bootstrap->Connect(); -- cgit v1.1