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

Unified Diff: remoting/base/auto_thread_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/base/auto_thread_task_runner_unittest.cc ('k') | remoting/client/client_status_logger_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/auto_thread_unittest.cc
diff --git a/remoting/base/auto_thread_unittest.cc b/remoting/base/auto_thread_unittest.cc
index 0faac347df14f8c1cc6f7e772c256d02fe3c3908..5c72e3513a22ee1a8e89b5db223a026f9d729e13 100644
--- a/remoting/base/auto_thread_unittest.cc
+++ b/remoting/base/auto_thread_unittest.cc
@@ -5,7 +5,9 @@
#include "base/bind.h"
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
+#include "base/run_loop.h"
#include "base/scoped_native_library.h"
+#include "base/single_thread_task_runner.h"
#include "build/build_config.h"
#include "remoting/base/auto_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -67,10 +69,10 @@ class AutoThreadTest : public testing::Test {
// references created in tests are gone. We also post a delayed quit
// task to |message_loop_| so the test will not hang on failure.
main_task_runner_ = NULL;
- message_loop_.PostDelayedTask(FROM_HERE,
- base::MessageLoop::QuitWhenIdleClosure(),
- base::TimeDelta::FromSeconds(5));
- message_loop_.Run();
+ message_loop_.task_runner()->PostDelayedTask(
+ FROM_HERE, base::MessageLoop::QuitWhenIdleClosure(),
+ base::TimeDelta::FromSeconds(5));
+ base::RunLoop().Run();
}
void SetUp() override {
@@ -88,7 +90,8 @@ class AutoThreadTest : public testing::Test {
protected:
void QuitMainMessageLoop() {
message_loop_quit_correctly_ = true;
- message_loop_.PostTask(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
+ message_loop_.task_runner()->PostTask(
+ FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
}
base::MessageLoop message_loop_;
« no previous file with comments | « remoting/base/auto_thread_task_runner_unittest.cc ('k') | remoting/client/client_status_logger_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698