| 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/mojo/ipc_mojo_bootstrap.h" | 5 #include "ipc/mojo/ipc_mojo_bootstrap.h" |
| 6 | 6 |
| 7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
| 8 #include "base/files/file.h" | 8 #include "base/files/file.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "ipc/ipc_test_base.h" | 10 #include "ipc/ipc_test_base.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 EXPECT_TRUE(WaitForClientShutdown()); | 68 EXPECT_TRUE(WaitForClientShutdown()); |
| 69 } | 69 } |
| 70 | 70 |
| 71 // A long running process that connects to us. | 71 // A long running process that connects to us. |
| 72 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(IPCMojoBootstrapTestClient) { | 72 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(IPCMojoBootstrapTestClient) { |
| 73 base::MessageLoopForIO main_message_loop; | 73 base::MessageLoopForIO main_message_loop; |
| 74 | 74 |
| 75 TestingDelegate delegate; | 75 TestingDelegate delegate; |
| 76 scoped_ptr<IPC::MojoBootstrap> bootstrap = IPC::MojoBootstrap::Create( | 76 scoped_ptr<IPC::MojoBootstrap> bootstrap = IPC::MojoBootstrap::Create( |
| 77 IPCTestBase::GetChannelName("IPCMojoBootstrapTestClient"), | 77 IPCTestBase::GetChannelName("IPCMojoBootstrapTestClient"), |
| 78 IPC::Channel::MODE_CLIENT, | 78 IPC::Channel::MODE_CLIENT, &delegate, nullptr); |
| 79 &delegate, | |
| 80 nullptr); | |
| 81 | 79 |
| 82 bootstrap->Connect(); | 80 bootstrap->Connect(); |
| 83 | 81 |
| 84 base::MessageLoop::current()->Run(); | 82 base::MessageLoop::current()->Run(); |
| 85 | 83 |
| 86 EXPECT_TRUE(delegate.passed()); | 84 EXPECT_TRUE(delegate.passed()); |
| 87 | 85 |
| 88 return 0; | 86 return 0; |
| 89 } | 87 } |
| 90 | 88 |
| 91 } // namespace | 89 } // namespace |
| OLD | NEW |