OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 EXPECT_TRUE(WaitForClientShutdown()); | 183 EXPECT_TRUE(WaitForClientShutdown()); |
184 DestroyChannel(); | 184 DestroyChannel(); |
185 } | 185 } |
186 | 186 |
187 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(GenericClient) { | 187 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(GenericClient) { |
188 base::MessageLoopForIO main_message_loop; | 188 base::MessageLoopForIO main_message_loop; |
189 IPC::TestChannelListener listener; | 189 IPC::TestChannelListener listener; |
190 | 190 |
191 // Set up IPC channel. | 191 // Set up IPC channel. |
192 scoped_ptr<IPC::Channel> channel(IPC::Channel::CreateClient( | 192 scoped_ptr<IPC::Channel> channel(IPC::Channel::CreateClient( |
193 IPCTestBase::GetChannelName("GenericClient"), | 193 IPCTestBase::GetChannelName("GenericClient"), &listener, nullptr)); |
194 &listener)); | |
195 CHECK(channel->Connect()); | 194 CHECK(channel->Connect()); |
196 listener.Init(channel.get()); | 195 listener.Init(channel.get()); |
197 IPC::TestChannelListener::SendOneMessage(channel.get(), "hello from child"); | 196 IPC::TestChannelListener::SendOneMessage(channel.get(), "hello from child"); |
198 | 197 |
199 base::MessageLoop::current()->Run(); | 198 base::MessageLoop::current()->Run(); |
200 return 0; | 199 return 0; |
201 } | 200 } |
202 | 201 |
203 } // namespace | 202 } // namespace |
OLD | NEW |