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

Unified Diff: media/audio/win/audio_low_latency_output_win_unittest.cc

Issue 1169923009: Remove remaining use of the deprecated MessageLoopProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo. Created 5 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/base/android/media_codec_player.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/win/audio_low_latency_output_win_unittest.cc
diff --git a/media/audio/win/audio_low_latency_output_win_unittest.cc b/media/audio/win/audio_low_latency_output_win_unittest.cc
index 85516de0cbdad95da989fc5f52275f7ac1a57f05..348543ce9328f506d0d327ec65efc02a4c554b99 100644
--- a/media/audio/win/audio_low_latency_output_win_unittest.cc
+++ b/media/audio/win/audio_low_latency_output_win_unittest.cc
@@ -56,9 +56,9 @@ MATCHER_P(HasValidDelay, value, "") {
}
// Used to terminate a loop from a different thread than the loop belongs to.
-// |loop| should be a MessageLoopProxy.
-ACTION_P(QuitLoop, loop) {
- loop->PostTask(FROM_HERE, base::MessageLoop::QuitClosure());
+// |task_runner| should be a SingleThreadTaskRunner.
+ACTION_P(QuitLoop, task_runner) {
+ task_runner->PostTask(FROM_HERE, base::MessageLoop::QuitClosure());
}
// This audio source implementation should be used for manual tests only since
@@ -381,9 +381,8 @@ TEST(WASAPIAudioOutputStreamTest, ValidPacketSize) {
// Wait for the first callback and verify its parameters.
EXPECT_CALL(source, OnMoreData(NotNull(), HasValidDelay(bytes_per_packet)))
- .WillOnce(DoAll(
- QuitLoop(loop.message_loop_proxy()),
- Return(aosw.samples_per_packet())));
+ .WillOnce(DoAll(QuitLoop(loop.task_runner()),
+ Return(aosw.samples_per_packet())));
aos->Start(&source);
loop.PostDelayedTask(FROM_HERE, base::MessageLoop::QuitClosure(),
@@ -575,9 +574,8 @@ TEST(WASAPIAudioOutputStreamTest, DISABLED_ExclusiveModeMinBufferSizeAt48kHz) {
// Wait for the first callback and verify its parameters.
EXPECT_CALL(source, OnMoreData(NotNull(), HasValidDelay(bytes_per_packet)))
- .WillOnce(DoAll(
- QuitLoop(loop.message_loop_proxy()),
- Return(aosw.samples_per_packet())))
+ .WillOnce(DoAll(QuitLoop(loop.task_runner()),
+ Return(aosw.samples_per_packet())))
.WillRepeatedly(Return(aosw.samples_per_packet()));
aos->Start(&source);
@@ -610,10 +608,9 @@ TEST(WASAPIAudioOutputStreamTest, DISABLED_ExclusiveModeMinBufferSizeAt44kHz) {
// Wait for the first callback and verify its parameters.
EXPECT_CALL(source, OnMoreData(NotNull(), HasValidDelay(bytes_per_packet)))
- .WillOnce(DoAll(
- QuitLoop(loop.message_loop_proxy()),
- Return(aosw.samples_per_packet())))
- .WillRepeatedly(Return(aosw.samples_per_packet()));
+ .WillOnce(DoAll(QuitLoop(loop.task_runner()),
+ Return(aosw.samples_per_packet())))
+ .WillRepeatedly(Return(aosw.samples_per_packet()));
aos->Start(&source);
loop.PostDelayedTask(FROM_HERE, base::MessageLoop::QuitClosure(),
« no previous file with comments | « media/audio/audio_output_device_unittest.cc ('k') | media/base/android/media_codec_player.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698