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

Unified Diff: media/base/serial_runner_unittest.cc

Issue 2086353002: Remove calls to deprecated MessageLoop methods in media. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 | « media/base/pipeline_impl_unittest.cc ('k') | media/base/text_renderer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/serial_runner_unittest.cc
diff --git a/media/base/serial_runner_unittest.cc b/media/base/serial_runner_unittest.cc
index 236dc776591658b099593693911db30a23474012..800046a631bd466200543c38f9b6726a35248325 100644
--- a/media/base/serial_runner_unittest.cc
+++ b/media/base/serial_runner_unittest.cc
@@ -9,6 +9,8 @@
#include "base/debug/stack_trace.h"
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
+#include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
#include "media/base/pipeline_status.h"
#include "media/base/serial_runner.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -22,10 +24,10 @@ class SerialRunnerTest : public ::testing::Test {
~SerialRunnerTest() override {}
void RunSerialRunner() {
- message_loop_.PostTask(FROM_HERE, base::Bind(
- &SerialRunnerTest::StartRunnerInternal, base::Unretained(this),
- bound_fns_));
- message_loop_.RunUntilIdle();
+ message_loop_.task_runner()->PostTask(
+ FROM_HERE, base::Bind(&SerialRunnerTest::StartRunnerInternal,
+ base::Unretained(this), bound_fns_));
+ base::RunLoop().RunUntilIdle();
}
// Pushes a bound function to the queue that will run its callback with
@@ -118,8 +120,9 @@ class SerialRunnerTest : public ::testing::Test {
void CancelSerialRunner(const PipelineStatusCB& status_cb) {
// Tasks run by |runner_| shouldn't reset it, hence we post a task to do so.
- message_loop_.PostTask(FROM_HERE, base::Bind(
- &SerialRunnerTest::ResetSerialRunner, base::Unretained(this)));
+ message_loop_.task_runner()->PostTask(
+ FROM_HERE, base::Bind(&SerialRunnerTest::ResetSerialRunner,
+ base::Unretained(this)));
status_cb.Run(PIPELINE_OK);
}
« no previous file with comments | « media/base/pipeline_impl_unittest.cc ('k') | media/base/text_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698