| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |