| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 EXPECT_TRUE(WaitForClientShutdown()); | 160 EXPECT_TRUE(WaitForClientShutdown()); |
| 161 DestroyChannel(); | 161 DestroyChannel(); |
| 162 } | 162 } |
| 163 | 163 |
| 164 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(GenericClient) { | 164 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(GenericClient) { |
| 165 base::MessageLoopForIO main_message_loop; | 165 base::MessageLoopForIO main_message_loop; |
| 166 IPC::TestChannelListener listener; | 166 IPC::TestChannelListener listener; |
| 167 | 167 |
| 168 // Set up IPC channel. | 168 // Set up IPC channel. |
| 169 scoped_ptr<IPC::Channel> channel(IPC::Channel::CreateClient( | 169 scoped_ptr<IPC::Channel> channel(IPC::Channel::CreateClient( |
| 170 IPCTestBase::GetChannelName("GenericClient"), &listener, nullptr)); | 170 IPCTestBase::GetChannelName("GenericClient"), &listener)); |
| 171 CHECK(channel->Connect()); | 171 CHECK(channel->Connect()); |
| 172 listener.Init(channel.get()); | 172 listener.Init(channel.get()); |
| 173 IPC::TestChannelListener::SendOneMessage(channel.get(), "hello from child"); | 173 IPC::TestChannelListener::SendOneMessage(channel.get(), "hello from child"); |
| 174 | 174 |
| 175 base::MessageLoop::current()->Run(); | 175 base::MessageLoop::current()->Run(); |
| 176 return 0; | 176 return 0; |
| 177 } | 177 } |
| 178 | 178 |
| 179 } // namespace | 179 } // namespace |
| OLD | NEW |