| 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop.h" | |
| 8 #include "base/pickle.h" | 7 #include "base/pickle.h" |
| 9 #include "base/threading/thread.h" | 8 #include "base/threading/thread.h" |
| 10 #include "ipc/ipc_message.h" | 9 #include "ipc/ipc_message.h" |
| 11 #include "ipc/ipc_test_base.h" | 10 #include "ipc/ipc_test_base.h" |
| 12 #include "ipc/message_filter.h" | 11 #include "ipc/message_filter.h" |
| 13 | 12 |
| 14 // Get basic type definitions. | 13 // Get basic type definitions. |
| 15 #define IPC_MESSAGE_IMPL | 14 #define IPC_MESSAGE_IMPL |
| 16 #include "ipc/ipc_channel_proxy_unittest_messages.h" | 15 #include "ipc/ipc_channel_proxy_unittest_messages.h" |
| 17 | 16 |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 IPCTestBase::SetUp(); | 235 IPCTestBase::SetUp(); |
| 237 | 236 |
| 238 Init("ChannelProxyClient"); | 237 Init("ChannelProxyClient"); |
| 239 | 238 |
| 240 thread_.reset(new base::Thread("ChannelProxyTestServerThread")); | 239 thread_.reset(new base::Thread("ChannelProxyTestServerThread")); |
| 241 base::Thread::Options options; | 240 base::Thread::Options options; |
| 242 options.message_loop_type = base::MessageLoop::TYPE_IO; | 241 options.message_loop_type = base::MessageLoop::TYPE_IO; |
| 243 thread_->StartWithOptions(options); | 242 thread_->StartWithOptions(options); |
| 244 | 243 |
| 245 listener_.reset(new QuitListener()); | 244 listener_.reset(new QuitListener()); |
| 246 CreateChannelProxy(listener_.get(), thread_->message_loop_proxy().get()); | 245 CreateChannelProxy(listener_.get(), thread_->task_runner().get()); |
| 247 | 246 |
| 248 ASSERT_TRUE(StartClient()); | 247 ASSERT_TRUE(StartClient()); |
| 249 } | 248 } |
| 250 | 249 |
| 251 void TearDown() override { | 250 void TearDown() override { |
| 252 DestroyChannelProxy(); | 251 DestroyChannelProxy(); |
| 253 thread_.reset(); | 252 thread_.reset(); |
| 254 listener_.reset(); | 253 listener_.reset(); |
| 255 IPCTestBase::TearDown(); | 254 IPCTestBase::TearDown(); |
| 256 } | 255 } |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 IPCTestBase::GetChannelName("ChannelProxyClient"), | 426 IPCTestBase::GetChannelName("ChannelProxyClient"), |
| 428 &listener)); | 427 &listener)); |
| 429 CHECK(channel->Connect()); | 428 CHECK(channel->Connect()); |
| 430 listener.Init(channel.get()); | 429 listener.Init(channel.get()); |
| 431 | 430 |
| 432 base::MessageLoop::current()->Run(); | 431 base::MessageLoop::current()->Run(); |
| 433 return 0; | 432 return 0; |
| 434 } | 433 } |
| 435 | 434 |
| 436 } // namespace | 435 } // namespace |
| OLD | NEW |