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

Unified Diff: remoting/host/win/worker_process_launcher_unittest.cc

Issue 2211473003: Remove calls to deprecated MessageLoop methods on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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/win/rdp_client_unittest.cc ('k') | remoting/protocol/ice_transport_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/win/worker_process_launcher_unittest.cc
diff --git a/remoting/host/win/worker_process_launcher_unittest.cc b/remoting/host/win/worker_process_launcher_unittest.cc
index a71318f37f663b09b7992cb14020e4c4d9896a02..caa8c66e29dea3e4e0fa5f3c055a1940de065169 100644
--- a/remoting/host/win/worker_process_launcher_unittest.cc
+++ b/remoting/host/win/worker_process_launcher_unittest.cc
@@ -12,6 +12,8 @@
#include "base/macros.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/win/scoped_handle.h"
#include "base/win/scoped_process_information.h"
#include "ipc/ipc_channel.h"
@@ -334,7 +336,8 @@ void WorkerProcessLauncherTest::StopWorker() {
}
void WorkerProcessLauncherTest::QuitMainMessageLoop() {
- message_loop_.PostTask(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
+ message_loop_.task_runner()->PostTask(
+ FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
}
void WorkerProcessLauncherTest::DoLaunchProcess() {
@@ -391,7 +394,7 @@ TEST_F(WorkerProcessLauncherTest, Start) {
StartWorker();
StopWorker();
- message_loop_.Run();
+ base::RunLoop().Run();
}
// Starts and connects to the worker process. Expect OnChannelConnected to be
@@ -410,7 +413,7 @@ TEST_F(WorkerProcessLauncherTest, StartAndConnect) {
.Times(0);
StartWorker();
- message_loop_.Run();
+ base::RunLoop().Run();
}
// Kills the worker process after the 1st connect and expects it to be
@@ -434,7 +437,7 @@ TEST_F(WorkerProcessLauncherTest, Restart) {
.Times(0);
StartWorker();
- message_loop_.Run();
+ base::RunLoop().Run();
}
// Drops the IPC channel to the worker process after the 1st connect and expects
@@ -457,7 +460,7 @@ TEST_F(WorkerProcessLauncherTest, DropIpcChannel) {
.Times(0);
StartWorker();
- message_loop_.Run();
+ base::RunLoop().Run();
}
// Returns a permanent error exit code and expects OnPermanentError() to be
@@ -480,7 +483,7 @@ TEST_F(WorkerProcessLauncherTest, PermanentError) {
&WorkerProcessLauncherTest::StopWorker));
StartWorker();
- message_loop_.Run();
+ base::RunLoop().Run();
}
// Requests the worker to crash and expects it to honor the request.
@@ -505,7 +508,7 @@ TEST_F(WorkerProcessLauncherTest, Crash) {
EXCEPTION_BREAKPOINT)));
StartWorker();
- message_loop_.Run();
+ base::RunLoop().Run();
}
// Requests the worker to crash and terminates the worker even if it does not
@@ -530,7 +533,7 @@ TEST_F(WorkerProcessLauncherTest, CrashAnyway) {
this, &WorkerProcessLauncherTest::SendFakeMessageToLauncher));
StartWorker();
- message_loop_.Run();
+ base::RunLoop().Run();
}
} // namespace remoting
« no previous file with comments | « remoting/host/win/rdp_client_unittest.cc ('k') | remoting/protocol/ice_transport_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698