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

Unified Diff: remoting/protocol/channel_multiplexer_unittest.cc

Issue 2104363004: Remove remaining calls to deprecated MessageLoop methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR gab Created 4 years, 5 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
« no previous file with comments | « remoting/protocol/authenticator_test_base.h ('k') | remoting/protocol/connection_tester.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/channel_multiplexer_unittest.cc
diff --git a/remoting/protocol/channel_multiplexer_unittest.cc b/remoting/protocol/channel_multiplexer_unittest.cc
index 0cac0452110ba64f01cbbc446894bd21c71ab9ab..30e5be9090bfa97ddda662ae138c289d6a86b6d5 100644
--- a/remoting/protocol/channel_multiplexer_unittest.cc
+++ b/remoting/protocol/channel_multiplexer_unittest.cc
@@ -99,7 +99,7 @@ class ChannelMultiplexerTest : public testing::Test {
&ChannelMultiplexerTest::OnChannelConnected, base::Unretained(this),
client_socket, &counter));
- message_loop_.Run();
+ base::RunLoop().Run();
EXPECT_TRUE(host_socket->get());
EXPECT_TRUE(client_socket->get());
@@ -124,8 +124,11 @@ class ChannelMultiplexerTest : public testing::Test {
return result;
}
+ private:
+ // Must be instantiated before the FakeStreamChannelFactories below.
base::MessageLoop message_loop_;
+ protected:
FakeStreamChannelFactory host_channel_factory_;
FakeStreamChannelFactory client_channel_factory_;
@@ -148,7 +151,7 @@ TEST_F(ChannelMultiplexerTest, OneChannel) {
StreamConnectionTester tester(host_socket.get(), client_socket.get(),
kMessageSize, kMessages);
tester.Start();
- message_loop_.Run();
+ base::RunLoop().Run();
tester.CheckResults();
}
@@ -170,7 +173,7 @@ TEST_F(ChannelMultiplexerTest, TwoChannels) {
tester1.Start();
tester2.Start();
while (!tester1.done() || !tester2.done()) {
- message_loop_.Run();
+ base::RunLoop().Run();
}
tester1.CheckResults();
tester2.CheckResults();
@@ -212,7 +215,7 @@ TEST_F(ChannelMultiplexerTest, FourChannels) {
tester4.Start();
while (!tester1.done() || !tester2.done() ||
!tester3.done() || !tester4.done()) {
- message_loop_.Run();
+ base::RunLoop().Run();
}
tester1.CheckResults();
tester2.CheckResults();
« no previous file with comments | « remoting/protocol/authenticator_test_base.h ('k') | remoting/protocol/connection_tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698