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

Unified Diff: remoting/host/host_status_logger_unittest.cc

Issue 2132593002: Remove remaining calls to deprecated MessageLoop methods on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: h264_vt_encoder_unittest.cc 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/client/client_status_logger_unittest.cc ('k') | services/shell/background/background_shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/host_status_logger_unittest.cc
diff --git a/remoting/host/host_status_logger_unittest.cc b/remoting/host/host_status_logger_unittest.cc
index 67aa6c4dec079de1d6fd469a687753f980ce8d9e..6b24ccf7d60fe6d9fde7392666091353fdaf4f2c 100644
--- a/remoting/host/host_status_logger_unittest.cc
+++ b/remoting/host/host_status_logger_unittest.cc
@@ -24,8 +24,8 @@ namespace remoting {
namespace {
-ACTION_P(QuitMainMessageLoop, message_loop) {
- message_loop->PostTask(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
+ACTION_P(QuitRunLoop, run_loop) {
+ run_loop->QuitWhenIdle();
}
const char kJabberClientNamespace[] = "jabber:client";
@@ -143,6 +143,7 @@ class HostStatusLoggerTest : public testing::Test {
};
TEST_F(HostStatusLoggerTest, SendNow) {
+ base::RunLoop run_loop;
{
InSequence s;
EXPECT_CALL(signal_strategy_, GetLocalJid())
@@ -152,7 +153,7 @@ TEST_F(HostStatusLoggerTest, SendNow) {
EXPECT_CALL(signal_strategy_, SendStanzaPtr(IsClientConnected("direct")))
.WillOnce(DoAll(DeleteArg<0>(), Return(true)));
EXPECT_CALL(signal_strategy_, RemoveListener(_))
- .WillOnce(QuitMainMessageLoop(&message_loop_))
+ .WillOnce(QuitRunLoop(&run_loop))
.RetiresOnSaturation();
}
host_status_logger_->SetSignalingStateForTest(SignalStrategy::CONNECTED);
@@ -163,10 +164,11 @@ TEST_F(HostStatusLoggerTest, SendNow) {
host_status_logger_->OnClientConnected(kClientJid1);
host_status_logger_->SetSignalingStateForTest(
SignalStrategy::DISCONNECTED);
- base::RunLoop().Run();
+ run_loop.Run();
}
TEST_F(HostStatusLoggerTest, SendLater) {
+ base::RunLoop run_loop;
protocol::TransportRoute route;
route.type = protocol::TransportRoute::DIRECT;
host_status_logger_->OnClientRouteChange(kClientJid1, "video", route);
@@ -181,15 +183,16 @@ TEST_F(HostStatusLoggerTest, SendLater) {
EXPECT_CALL(signal_strategy_, SendStanzaPtr(IsClientConnected("direct")))
.WillOnce(DoAll(DeleteArg<0>(), Return(true)));
EXPECT_CALL(signal_strategy_, RemoveListener(_))
- .WillOnce(QuitMainMessageLoop(&message_loop_))
+ .WillOnce(QuitRunLoop(&run_loop))
.RetiresOnSaturation();
}
host_status_logger_->SetSignalingStateForTest(SignalStrategy::CONNECTED);
host_status_logger_->SetSignalingStateForTest(SignalStrategy::DISCONNECTED);
- base::RunLoop().Run();
+ run_loop.Run();
}
TEST_F(HostStatusLoggerTest, SendTwoEntriesLater) {
+ base::RunLoop run_loop;
protocol::TransportRoute route1;
route1.type = protocol::TransportRoute::DIRECT;
host_status_logger_->OnClientRouteChange(kClientJid1, "video", route1);
@@ -210,15 +213,16 @@ TEST_F(HostStatusLoggerTest, SendTwoEntriesLater) {
SendStanzaPtr(IsTwoClientsConnected("direct", "stun")))
.WillOnce(DoAll(DeleteArg<0>(), Return(true)));
EXPECT_CALL(signal_strategy_, RemoveListener(_))
- .WillOnce(QuitMainMessageLoop(&message_loop_))
+ .WillOnce(QuitRunLoop(&run_loop))
.RetiresOnSaturation();
}
host_status_logger_->SetSignalingStateForTest(SignalStrategy::CONNECTED);
host_status_logger_->SetSignalingStateForTest(SignalStrategy::DISCONNECTED);
- base::RunLoop().Run();
+ run_loop.Run();
}
TEST_F(HostStatusLoggerTest, HandleRouteChangeInUnusualOrder) {
+ base::RunLoop run_loop;
{
InSequence s;
EXPECT_CALL(signal_strategy_, GetLocalJid())
@@ -234,7 +238,7 @@ TEST_F(HostStatusLoggerTest, HandleRouteChangeInUnusualOrder) {
EXPECT_CALL(signal_strategy_, SendStanzaPtr(IsClientConnected("stun")))
.WillOnce(DoAll(DeleteArg<0>(), Return(true)));
EXPECT_CALL(signal_strategy_, RemoveListener(_))
- .WillOnce(QuitMainMessageLoop(&message_loop_))
+ .WillOnce(QuitRunLoop(&run_loop))
.RetiresOnSaturation();
}
host_status_logger_->SetSignalingStateForTest(SignalStrategy::CONNECTED);
@@ -250,7 +254,7 @@ TEST_F(HostStatusLoggerTest, HandleRouteChangeInUnusualOrder) {
host_status_logger_->OnClientAuthenticated(kClientJid2);
host_status_logger_->OnClientConnected(kClientJid2);
host_status_logger_->SetSignalingStateForTest(SignalStrategy::DISCONNECTED);
- base::RunLoop().Run();
+ run_loop.Run();
}
} // namespace remoting
« no previous file with comments | « remoting/client/client_status_logger_unittest.cc ('k') | services/shell/background/background_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698