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

Unified Diff: media/audio/audio_output_proxy_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/audio/audio_output_device_unittest.cc ('k') | media/audio/fake_audio_worker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_output_proxy_unittest.cc
diff --git a/media/audio/audio_output_proxy_unittest.cc b/media/audio/audio_output_proxy_unittest.cc
index 44af384c4b400ddbd2d25cae36ac6a7f1ad6d2f6..d999d3c5ee108983db6b650f51653b297eb65db3 100644
--- a/media/audio/audio_output_proxy_unittest.cc
+++ b/media/audio/audio_output_proxy_unittest.cc
@@ -9,6 +9,7 @@
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
#include "media/audio/audio_manager.h"
@@ -167,7 +168,7 @@ class AudioOutputProxyTest : public testing::Test {
void TearDown() override {
// This is necessary to free all proxy objects that have been
// closed by the test.
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
virtual void InitDispatcher(base::TimeDelta close_delay) {
@@ -443,9 +444,8 @@ class AudioOutputResamplerTest : public AudioOutputProxyTest {
void OnStart() override {
// Let Start() run for a bit.
base::RunLoop run_loop;
- message_loop_.PostDelayedTask(
- FROM_HERE,
- run_loop.QuitClosure(),
+ message_loop_.task_runner()->PostDelayedTask(
+ FROM_HERE, run_loop.QuitClosure(),
base::TimeDelta::FromMilliseconds(kStartRunTimeMs));
run_loop.Run();
}
@@ -725,7 +725,7 @@ TEST_F(AudioOutputResamplerTest, FallbackRecovery) {
// Once all proxies have been closed, AudioOutputResampler will start the
// reinitialization timer and execute it after the close delay elapses.
base::RunLoop run_loop;
- message_loop_.PostDelayedTask(
+ message_loop_.task_runner()->PostDelayedTask(
FROM_HERE, run_loop.QuitClosure(),
base::TimeDelta::FromMilliseconds(2 * kTestCloseDelayMs));
run_loop.Run();
« no previous file with comments | « media/audio/audio_output_device_unittest.cc ('k') | media/audio/fake_audio_worker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698