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

Unified Diff: base/message_loop/message_loop_task_runner_unittest.cc

Issue 2103333006: Remove calls to deprecated MessageLoop methods in base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « base/mac/libdispatch_task_runner_unittest.cc ('k') | base/message_loop/message_loop_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_loop_task_runner_unittest.cc
diff --git a/base/message_loop/message_loop_task_runner_unittest.cc b/base/message_loop/message_loop_task_runner_unittest.cc
index 60eef4c0e405816992df09ce03a5753c27a33530..cabd25013bc12e72ab752bc07f953c4670e6c4f1 100644
--- a/base/message_loop/message_loop_task_runner_unittest.cc
+++ b/base/message_loop/message_loop_task_runner_unittest.cc
@@ -11,6 +11,8 @@
#include "base/debug/leak_annotations.h"
#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_task_runner.h"
+#include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/synchronization/waitable_event.h"
#include "base/threading/thread.h"
#include "base/threading/thread_task_runner_handle.h"
@@ -36,7 +38,7 @@ class MessageLoopTaskRunnerTest : public testing::Test {
task_thread_.Start();
// Allow us to pause the |task_thread_|'s MessageLoop.
- task_thread_.message_loop()->PostTask(
+ task_thread_.message_loop()->task_runner()->PostTask(
FROM_HERE, Bind(&MessageLoopTaskRunnerTest::BlockTaskThreadHelper,
Unretained(this)));
}
@@ -258,7 +260,8 @@ class MessageLoopTaskRunnerThreadingTest : public testing::Test {
}
void Quit() const {
- loop_.PostTask(FROM_HERE, MessageLoop::QuitWhenIdleClosure());
+ loop_.task_runner()->PostTask(FROM_HERE,
+ MessageLoop::QuitWhenIdleClosure());
}
void AssertOnIOThread() const {
@@ -314,21 +317,21 @@ class MessageLoopTaskRunnerThreadingTest : public testing::Test {
TEST_F(MessageLoopTaskRunnerThreadingTest, Release) {
EXPECT_TRUE(io_thread_->task_runner()->ReleaseSoon(FROM_HERE, this));
- MessageLoop::current()->Run();
+ RunLoop().Run();
}
TEST_F(MessageLoopTaskRunnerThreadingTest, Delete) {
DeletedOnFile* deleted_on_file = new DeletedOnFile(this);
EXPECT_TRUE(
file_thread_->task_runner()->DeleteSoon(FROM_HERE, deleted_on_file));
- MessageLoop::current()->Run();
+ RunLoop().Run();
}
TEST_F(MessageLoopTaskRunnerThreadingTest, PostTask) {
EXPECT_TRUE(file_thread_->task_runner()->PostTask(
FROM_HERE, Bind(&MessageLoopTaskRunnerThreadingTest::BasicFunction,
Unretained(this))));
- MessageLoop::current()->Run();
+ RunLoop().Run();
}
TEST_F(MessageLoopTaskRunnerThreadingTest, PostTaskAfterThreadExits) {
« no previous file with comments | « base/mac/libdispatch_task_runner_unittest.cc ('k') | base/message_loop/message_loop_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698