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

Unified Diff: remoting/client/client_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 | « ppapi/proxy/ppb_message_loop_proxy.cc ('k') | remoting/host/host_status_logger_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/client_status_logger_unittest.cc
diff --git a/remoting/client/client_status_logger_unittest.cc b/remoting/client/client_status_logger_unittest.cc
index e7348a64d3610d4aa4278e3b384a46807e2bad48..f63871e267718d229cdbb643a0f29d18e56bedf7 100644
--- a/remoting/client/client_status_logger_unittest.cc
+++ b/remoting/client/client_status_logger_unittest.cc
@@ -25,8 +25,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 kTestBotJid[] = "remotingunittest@bot.talk.google.com";
@@ -81,6 +81,7 @@ class ClientStatusLoggerTest : public testing::Test {
};
TEST_F(ClientStatusLoggerTest, LogStateChange) {
+ base::RunLoop run_loop;
{
InSequence s;
EXPECT_CALL(signal_strategy_, GetLocalJid())
@@ -91,7 +92,7 @@ TEST_F(ClientStatusLoggerTest, LogStateChange) {
IsStateChange("connected", std::string())))
.WillOnce(DoAll(DeleteArg<0>(), Return(true)));
EXPECT_CALL(signal_strategy_, RemoveListener(_))
- .WillOnce(QuitMainMessageLoop(&message_loop_))
+ .WillOnce(QuitRunLoop(&run_loop))
.RetiresOnSaturation();
}
client_status_logger_->LogSessionStateChange(ConnectionToHost::CONNECTED,
@@ -102,10 +103,11 @@ TEST_F(ClientStatusLoggerTest, LogStateChange) {
// which removes the listener and terminates the test.
client_status_logger_->SetSignalingStateForTest(SignalStrategy::CONNECTED);
client_status_logger_->SetSignalingStateForTest(SignalStrategy::DISCONNECTED);
- base::RunLoop().Run();
+ run_loop.Run();
}
TEST_F(ClientStatusLoggerTest, LogStateChangeError) {
+ base::RunLoop run_loop;
{
InSequence s;
EXPECT_CALL(signal_strategy_, GetLocalJid())
@@ -116,7 +118,7 @@ TEST_F(ClientStatusLoggerTest, LogStateChangeError) {
IsStateChange("connection-failed", "host-is-offline")))
.WillOnce(DoAll(DeleteArg<0>(), Return(true)));
EXPECT_CALL(signal_strategy_, RemoveListener(_))
- .WillOnce(QuitMainMessageLoop(&message_loop_))
+ .WillOnce(QuitRunLoop(&run_loop))
.RetiresOnSaturation();
}
client_status_logger_->LogSessionStateChange(ConnectionToHost::FAILED,
@@ -124,10 +126,11 @@ TEST_F(ClientStatusLoggerTest, LogStateChangeError) {
client_status_logger_->SetSignalingStateForTest(SignalStrategy::CONNECTED);
client_status_logger_->SetSignalingStateForTest(SignalStrategy::DISCONNECTED);
- base::RunLoop().Run();
+ run_loop.Run();
}
TEST_F(ClientStatusLoggerTest, LogStatistics) {
+ base::RunLoop run_loop;
{
InSequence s;
EXPECT_CALL(signal_strategy_, GetLocalJid())
@@ -138,7 +141,7 @@ TEST_F(ClientStatusLoggerTest, LogStatistics) {
IsStatisticsLog()))
.WillOnce(DoAll(DeleteArg<0>(), Return(true)));
EXPECT_CALL(signal_strategy_, RemoveListener(_))
- .WillOnce(QuitMainMessageLoop(&message_loop_))
+ .WillOnce(QuitRunLoop(&run_loop))
.RetiresOnSaturation();
}
@@ -147,7 +150,7 @@ TEST_F(ClientStatusLoggerTest, LogStatistics) {
client_status_logger_->SetSignalingStateForTest(SignalStrategy::CONNECTED);
client_status_logger_->SetSignalingStateForTest(SignalStrategy::DISCONNECTED);
- base::RunLoop().Run();
+ run_loop.Run();
}
} // namespace remoting
« no previous file with comments | « ppapi/proxy/ppb_message_loop_proxy.cc ('k') | remoting/host/host_status_logger_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698