| Index: remoting/protocol/pseudotcp_adapter_unittest.cc
|
| diff --git a/remoting/protocol/pseudotcp_adapter_unittest.cc b/remoting/protocol/pseudotcp_adapter_unittest.cc
|
| index 1900214a070197957c6dfbcf39cfd20612525e44..27d677c9f365f18f0492635bb86aaee55b54e239 100644
|
| --- a/remoting/protocol/pseudotcp_adapter_unittest.cc
|
| +++ b/remoting/protocol/pseudotcp_adapter_unittest.cc
|
| @@ -11,6 +11,7 @@
|
| #include "base/compiler_specific.h"
|
| #include "base/location.h"
|
| #include "base/memory/ptr_util.h"
|
| +#include "base/run_loop.h"
|
| #include "base/single_thread_task_runner.h"
|
| #include "base/threading/thread_task_runner_handle.h"
|
| #include "jingle/glue/thread_wrapper.h"
|
| @@ -166,7 +167,7 @@ class TCPChannelTester : public base::RefCountedThreadSafe<TCPChannelTester> {
|
| read_errors_(0) {}
|
|
|
| void Start() {
|
| - message_loop_->PostTask(
|
| + message_loop_->task_runner()->PostTask(
|
| FROM_HERE, base::Bind(&TCPChannelTester::DoStart, this));
|
| }
|
|
|
| @@ -188,8 +189,8 @@ class TCPChannelTester : public base::RefCountedThreadSafe<TCPChannelTester> {
|
|
|
| void Done() {
|
| done_ = true;
|
| - message_loop_->PostTask(FROM_HERE,
|
| - base::MessageLoop::QuitWhenIdleClosure());
|
| + message_loop_->task_runner()->PostTask(
|
| + FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
|
| }
|
|
|
| void DoStart() {
|
| @@ -330,7 +331,7 @@ TEST_F(PseudoTcpAdapterTest, DataTransfer) {
|
| client_pseudotcp_.get());
|
|
|
| tester->Start();
|
| - message_loop_.Run();
|
| + base::RunLoop().Run();
|
| tester->CheckResults();
|
| }
|
|
|
| @@ -365,7 +366,7 @@ TEST_F(PseudoTcpAdapterTest, LimitedChannel) {
|
| client_pseudotcp_.get());
|
|
|
| tester->Start();
|
| - message_loop_.Run();
|
| + base::RunLoop().Run();
|
| tester->CheckResults();
|
| }
|
|
|
| @@ -376,8 +377,8 @@ class DeleteOnConnected {
|
| : message_loop_(message_loop), adapter_(adapter) {}
|
| void OnConnected(int error) {
|
| adapter_->reset();
|
| - message_loop_->PostTask(FROM_HERE,
|
| - base::MessageLoop::QuitWhenIdleClosure());
|
| + message_loop_->task_runner()->PostTask(
|
| + FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
|
| }
|
| base::MessageLoop* message_loop_;
|
| std::unique_ptr<PseudoTcpAdapter>* adapter_;
|
| @@ -393,7 +394,7 @@ TEST_F(PseudoTcpAdapterTest, DeleteOnConnected) {
|
| host_pseudotcp_->Connect(base::Bind(&DeleteOnConnected::OnConnected,
|
| base::Unretained(&host_delete)));
|
| client_pseudotcp_->Connect(client_connect_cb.callback());
|
| - message_loop_.Run();
|
| + base::RunLoop().Run();
|
|
|
| ASSERT_EQ(NULL, host_pseudotcp_.get());
|
| }
|
| @@ -426,7 +427,7 @@ TEST_F(PseudoTcpAdapterTest, WriteWaitsForSendLetsDataThrough) {
|
| client_pseudotcp_.get());
|
|
|
| tester->Start();
|
| - message_loop_.Run();
|
| + base::RunLoop().Run();
|
| tester->CheckResults();
|
| }
|
|
|
|
|