| 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 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 sender()->Send(message); | 258 sender()->Send(message); |
| 259 | 259 |
| 260 EXPECT_TRUE(WaitForClientShutdown()); | 260 EXPECT_TRUE(WaitForClientShutdown()); |
| 261 DestroyChannel(); | 261 DestroyChannel(); |
| 262 } | 262 } |
| 263 | 263 |
| 264 // This message loop bounces all messages back to the sender. | 264 // This message loop bounces all messages back to the sender. |
| 265 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(PerformanceClient) { | 265 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(PerformanceClient) { |
| 266 base::MessageLoopForIO main_message_loop; | 266 base::MessageLoopForIO main_message_loop; |
| 267 ChannelReflectorListener listener; | 267 ChannelReflectorListener listener; |
| 268 IPC::Channel channel(IPCTestBase::GetChannelName("PerformanceClient"), | 268 scoped_ptr<IPC::Channel> channel(IPC::Channel::CreateClient( |
| 269 IPC::Channel::MODE_CLIENT, | 269 IPCTestBase::GetChannelName("PerformanceClient"), &listener)); |
| 270 &listener); | 270 listener.Init(channel.get()); |
| 271 listener.Init(&channel); | 271 CHECK(channel->Connect()); |
| 272 CHECK(channel.Connect()); | |
| 273 | 272 |
| 274 base::MessageLoop::current()->Run(); | 273 base::MessageLoop::current()->Run(); |
| 275 return 0; | 274 return 0; |
| 276 } | 275 } |
| 277 | 276 |
| 278 } // namespace | 277 } // namespace |
| OLD | NEW |