Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: ipc/ipc_mojo_bootstrap_unittest.cc

Issue 2227553002: Support mojo connections between unrelated peer processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ipc/ipc_channel_mojo_unittest.cc ('k') | mojo/edk/embedder/embedder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ipc/ipc_mojo_bootstrap.h" 5 #include "ipc/ipc_mojo_bootstrap.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 70 }
71 71
72 // A long running process that connects to us. 72 // A long running process that connects to us.
73 MULTIPROCESS_TEST_MAIN_WITH_SETUP( 73 MULTIPROCESS_TEST_MAIN_WITH_SETUP(
74 IPCMojoBootstrapTestClientTestChildMain, 74 IPCMojoBootstrapTestClientTestChildMain,
75 ::mojo::edk::test::MultiprocessTestHelper::ChildSetup) { 75 ::mojo::edk::test::MultiprocessTestHelper::ChildSetup) {
76 base::MessageLoop message_loop; 76 base::MessageLoop message_loop;
77 base::RunLoop run_loop; 77 base::RunLoop run_loop;
78 TestingDelegate delegate(run_loop.QuitClosure()); 78 TestingDelegate delegate(run_loop.QuitClosure());
79 std::unique_ptr<IPC::MojoBootstrap> bootstrap = IPC::MojoBootstrap::Create( 79 std::unique_ptr<IPC::MojoBootstrap> bootstrap = IPC::MojoBootstrap::Create(
80 mojo::edk::CreateChildMessagePipe( 80 std::move(mojo::edk::test::MultiprocessTestHelper::primordial_pipe),
81 mojo::edk::test::MultiprocessTestHelper::primordial_pipe_token),
82 IPC::Channel::MODE_CLIENT, &delegate, 81 IPC::Channel::MODE_CLIENT, &delegate,
83 base::ThreadTaskRunnerHandle::Get()); 82 base::ThreadTaskRunnerHandle::Get());
84 83
85 bootstrap->Connect(); 84 bootstrap->Connect();
86 85
87 run_loop.Run(); 86 run_loop.Run();
88 87
89 return delegate.passed() ? 0 : 1; 88 return delegate.passed() ? 0 : 1;
90 } 89 }
91 90
92 } // namespace 91 } // namespace
OLDNEW
« no previous file with comments | « ipc/ipc_channel_mojo_unittest.cc ('k') | mojo/edk/embedder/embedder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698