Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1392)

Unified Diff: remoting/protocol/pseudotcp_adapter_unittest.cc

Issue 2082363002: Remove calls to deprecated MessageLoop methods in remoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
}
« no previous file with comments | « remoting/protocol/chromium_socket_factory_unittest.cc ('k') | remoting/protocol/spake2_authenticator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698