summaryrefslogtreecommitdiffstats
path: root/ipc/mojo/ipc_mojo_bootstrap_unittest.cc
diff options
context:
space:
mode:
authortsergeant <tsergeant@chromium.org>2016-03-09 19:51:33 -0800
committerCommit bot <commit-bot@chromium.org>2016-03-10 03:53:03 +0000
commit896012863947ba511c55ce7c65aa1002cd3894eb (patch)
tree81614102d853a7d1fc16e207083905ece2ae14e3 /ipc/mojo/ipc_mojo_bootstrap_unittest.cc
parent4819f8b1cfab20b5598d5426ff48dbeae1b1955a (diff)
downloadchromium_src-896012863947ba511c55ce7c65aa1002cd3894eb.zip
chromium_src-896012863947ba511c55ce7c65aa1002cd3894eb.tar.gz
chromium_src-896012863947ba511c55ce7c65aa1002cd3894eb.tar.bz2
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}
Diffstat (limited to 'ipc/mojo/ipc_mojo_bootstrap_unittest.cc')
-rw-r--r--ipc/mojo/ipc_mojo_bootstrap_unittest.cc14
1 files changed, 7 insertions, 7 deletions
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<IPC::MojoBootstrap> 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<IPC::MojoBootstrap> bootstrap = IPC::MojoBootstrap::Create(
- mojo::MakeScopedHandle(mojo::MessagePipeHandle(pipe)),
- IPC::Channel::MODE_CLIENT, &delegate);
+ kMojoChannelToken, IPC::Channel::MODE_CLIENT, &delegate);
bootstrap->Connect();