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 <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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 IPC::mojom::ChannelAssociatedRequest receive_channel, | 52 IPC::mojom::ChannelAssociatedRequest receive_channel, |
53 int32_t peer_pid) { | 53 int32_t peer_pid) { |
54 passed_ = true; | 54 passed_ = true; |
55 quit_callback_.Run(); | 55 quit_callback_.Run(); |
56 } | 56 } |
57 | 57 |
58 void TestingDelegate::OnBootstrapError() { | 58 void TestingDelegate::OnBootstrapError() { |
59 quit_callback_.Run(); | 59 quit_callback_.Run(); |
60 } | 60 } |
61 | 61 |
62 TEST_F(IPCMojoBootstrapTest, Connect) { | 62 // Times out on Android; see http://crbug.com/502290 |
| 63 #if defined(OS_ANDROID) |
| 64 #define MAYBE_Connect DISABLED_Connect |
| 65 #else |
| 66 #define MAYBE_Connect Connect |
| 67 #endif |
| 68 TEST_F(IPCMojoBootstrapTest, MAYBE_Connect) { |
63 base::MessageLoop message_loop; | 69 base::MessageLoop message_loop; |
64 base::RunLoop run_loop; | 70 base::RunLoop run_loop; |
65 TestingDelegate delegate(run_loop.QuitClosure()); | 71 TestingDelegate delegate(run_loop.QuitClosure()); |
66 std::unique_ptr<IPC::MojoBootstrap> bootstrap = IPC::MojoBootstrap::Create( | 72 std::unique_ptr<IPC::MojoBootstrap> bootstrap = IPC::MojoBootstrap::Create( |
67 helper_.StartChild("IPCMojoBootstrapTestClient"), | 73 helper_.StartChild("IPCMojoBootstrapTestClient"), |
68 IPC::Channel::MODE_SERVER, &delegate); | 74 IPC::Channel::MODE_SERVER, &delegate); |
69 | 75 |
70 bootstrap->Connect(); | 76 bootstrap->Connect(); |
71 run_loop.Run(); | 77 run_loop.Run(); |
72 | 78 |
(...skipping 14 matching lines...) Expand all Loading... |
87 IPC::Channel::MODE_CLIENT, &delegate); | 93 IPC::Channel::MODE_CLIENT, &delegate); |
88 | 94 |
89 bootstrap->Connect(); | 95 bootstrap->Connect(); |
90 | 96 |
91 run_loop.Run(); | 97 run_loop.Run(); |
92 | 98 |
93 return delegate.passed() ? 0 : 1; | 99 return delegate.passed() ? 0 : 1; |
94 } | 100 } |
95 | 101 |
96 } // namespace | 102 } // namespace |
OLD | NEW |