| 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 scoped_ptr<IPC::Channel> channel(IPC::Channel::CreateClient( | 268 IPC::Channel channel(IPCTestBase::GetChannelName("PerformanceClient"), |
| 269 IPCTestBase::GetChannelName("PerformanceClient"), &listener)); | 269 IPC::Channel::MODE_CLIENT, |
| 270 listener.Init(channel.get()); | 270 &listener); |
| 271 CHECK(channel->Connect()); | 271 listener.Init(&channel); |
| 272 CHECK(channel.Connect()); |
| 272 | 273 |
| 273 base::MessageLoop::current()->Run(); | 274 base::MessageLoop::current()->Run(); |
| 274 return 0; | 275 return 0; |
| 275 } | 276 } |
| 276 | 277 |
| 277 } // namespace | 278 } // namespace |
| OLD | NEW |