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

Unified Diff: remoting/host/host_change_notification_listener_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: add missing include 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
« no previous file with comments | « remoting/host/daemon_process_unittest.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/host/host_change_notification_listener_unittest.cc
diff --git a/remoting/host/host_change_notification_listener_unittest.cc b/remoting/host/host_change_notification_listener_unittest.cc
index cbacbf9d0ea2c3dfe2a03154f2809a3d739d13d5..fe8ff27918e84cf8808089613a1ebdf076e9c18e 100644
--- a/remoting/host/host_change_notification_listener_unittest.cc
+++ b/remoting/host/host_change_notification_listener_unittest.cc
@@ -9,6 +9,8 @@
#include "base/bind.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop.h"
+#include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "remoting/base/constants.h"
#include "remoting/signaling/mock_signal_strategy.h"
@@ -96,9 +98,9 @@ TEST_F(HostChangeNotificationListenerTest, ReceiveValidNotification) {
GetNotificationStanza("delete", kHostId, kTestBotJid);
host_change_notification_listener_->OnSignalStrategyIncomingStanza(
stanza.get());
- message_loop_.PostTask(FROM_HERE,
- base::Bind(base::MessageLoop::QuitWhenIdleClosure()));
- message_loop_.Run();
+ message_loop_.task_runner()->PostTask(
+ FROM_HERE, base::Bind(base::MessageLoop::QuitWhenIdleClosure()));
+ base::RunLoop().Run();
}
TEST_F(HostChangeNotificationListenerTest, ReceiveNotificationBeforeDelete) {
@@ -109,9 +111,9 @@ TEST_F(HostChangeNotificationListenerTest, ReceiveNotificationBeforeDelete) {
host_change_notification_listener_->OnSignalStrategyIncomingStanza(
stanza.get());
host_change_notification_listener_.reset();
- message_loop_.PostTask(FROM_HERE,
- base::Bind(base::MessageLoop::QuitWhenIdleClosure()));
- message_loop_.Run();
+ message_loop_.task_runner()->PostTask(
+ FROM_HERE, base::Bind(base::MessageLoop::QuitWhenIdleClosure()));
+ base::RunLoop().Run();
}
@@ -122,9 +124,9 @@ TEST_F(HostChangeNotificationListenerTest, ReceiveInvalidHostIdNotification) {
GetNotificationStanza("delete", "1", kTestBotJid);
host_change_notification_listener_->OnSignalStrategyIncomingStanza(
stanza.get());
- message_loop_.PostTask(FROM_HERE,
- base::Bind(base::MessageLoop::QuitWhenIdleClosure()));
- message_loop_.Run();
+ message_loop_.task_runner()->PostTask(
+ FROM_HERE, base::Bind(base::MessageLoop::QuitWhenIdleClosure()));
+ base::RunLoop().Run();
}
TEST_F(HostChangeNotificationListenerTest, ReceiveInvalidBotJidNotification) {
@@ -134,9 +136,9 @@ TEST_F(HostChangeNotificationListenerTest, ReceiveInvalidBotJidNotification) {
"delete", kHostId, "notremotingbot@bot.talk.google.com");
host_change_notification_listener_->OnSignalStrategyIncomingStanza(
stanza.get());
- message_loop_.PostTask(FROM_HERE,
- base::Bind(base::MessageLoop::QuitWhenIdleClosure()));
- message_loop_.Run();
+ message_loop_.task_runner()->PostTask(
+ FROM_HERE, base::Bind(base::MessageLoop::QuitWhenIdleClosure()));
+ base::RunLoop().Run();
}
TEST_F(HostChangeNotificationListenerTest, ReceiveNonDeleteNotification) {
@@ -146,9 +148,9 @@ TEST_F(HostChangeNotificationListenerTest, ReceiveNonDeleteNotification) {
GetNotificationStanza("update", kHostId, kTestBotJid);
host_change_notification_listener_->OnSignalStrategyIncomingStanza(
stanza.get());
- message_loop_.PostTask(FROM_HERE,
- base::Bind(base::MessageLoop::QuitWhenIdleClosure()));
- message_loop_.Run();
+ message_loop_.task_runner()->PostTask(
+ FROM_HERE, base::Bind(base::MessageLoop::QuitWhenIdleClosure()));
+ base::RunLoop().Run();
}
} // namespace remoting
« no previous file with comments | « remoting/host/daemon_process_unittest.cc ('k') | remoting/host/host_status_logger_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698