| 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 "ipc/ipc_test_base.h" | 5 #include "ipc/ipc_test_base.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| 11 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
| 12 #include "base/threading/thread_task_runner_handle.h" |
| 12 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 13 #include "ipc/ipc_channel_mojo.h" | 14 #include "ipc/ipc_channel_mojo.h" |
| 14 | 15 |
| 15 IPCChannelMojoTestBase::IPCChannelMojoTestBase() = default; | 16 IPCChannelMojoTestBase::IPCChannelMojoTestBase() = default; |
| 16 IPCChannelMojoTestBase::~IPCChannelMojoTestBase() = default; | 17 IPCChannelMojoTestBase::~IPCChannelMojoTestBase() = default; |
| 17 | 18 |
| 18 void IPCChannelMojoTestBase::Init(const std::string& test_client_name) { | 19 void IPCChannelMojoTestBase::Init(const std::string& test_client_name) { |
| 19 InitWithCustomMessageLoop(test_client_name, | 20 InitWithCustomMessageLoop(test_client_name, |
| 20 base::MakeUnique<base::MessageLoop>()); | 21 base::MakeUnique<base::MessageLoop>()); |
| 21 } | 22 } |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 } | 71 } |
| 71 | 72 |
| 72 void IpcChannelMojoTestClient::Close() { | 73 void IpcChannelMojoTestClient::Close() { |
| 73 channel_->Close(); | 74 channel_->Close(); |
| 74 | 75 |
| 75 base::RunLoop run_loop; | 76 base::RunLoop run_loop; |
| 76 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, | 77 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, |
| 77 run_loop.QuitClosure()); | 78 run_loop.QuitClosure()); |
| 78 run_loop.Run(); | 79 run_loop.Run(); |
| 79 } | 80 } |
| OLD | NEW |