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

Unified Diff: media/filters/decrypting_audio_decoder_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/filters/chunk_demuxer_unittest.cc ('k') | media/filters/decrypting_demuxer_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/decrypting_audio_decoder_unittest.cc
diff --git a/media/filters/decrypting_audio_decoder_unittest.cc b/media/filters/decrypting_audio_decoder_unittest.cc
index 4b9784ee1a747d93554a333464fad8027b57d0a2..fe7f976cc8d977965fb0665a49ec0a7c3a79e00a 100644
--- a/media/filters/decrypting_audio_decoder_unittest.cc
+++ b/media/filters/decrypting_audio_decoder_unittest.cc
@@ -11,6 +11,7 @@
#include "base/callback_helpers.h"
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
+#include "base/run_loop.h"
#include "media/base/audio_buffer.h"
#include "media/base/decoder_buffer.h"
#include "media/base/decrypt_config.h"
@@ -99,7 +100,7 @@ class DecryptingAudioDecoderTest : public testing::Test {
decoder_->Initialize(config, cdm_context_.get(), NewExpectedBoolCB(success),
base::Bind(&DecryptingAudioDecoderTest::FrameReady,
base::Unretained(this)));
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
enum CdmType { CDM_WITHOUT_DECRYPTOR, CDM_WITH_DECRYPTOR };
@@ -146,7 +147,7 @@ class DecryptingAudioDecoderTest : public testing::Test {
decoder_->Decode(buffer,
base::Bind(&DecryptingAudioDecoderTest::DecodeDone,
base::Unretained(this)));
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
// Helper function to simulate the decrypting and decoding process in the
@@ -198,7 +199,7 @@ class DecryptingAudioDecoderTest : public testing::Test {
decoder_->Decode(encrypted_buffer_,
base::Bind(&DecryptingAudioDecoderTest::DecodeDone,
base::Unretained(this)));
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
// Make sure the Decode() on the decoder triggers a DecryptAndDecode() on
// the decryptor.
EXPECT_FALSE(pending_audio_decode_cb_.is_null());
@@ -212,7 +213,7 @@ class DecryptingAudioDecoderTest : public testing::Test {
decoder_->Decode(encrypted_buffer_,
base::Bind(&DecryptingAudioDecoderTest::DecodeDone,
base::Unretained(this)));
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
void AbortPendingAudioDecodeCB() {
@@ -238,7 +239,7 @@ class DecryptingAudioDecoderTest : public testing::Test {
this, &DecryptingAudioDecoderTest::AbortPendingAudioDecodeCB));
decoder_->Reset(NewExpectedClosure());
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
void Destroy() {
@@ -247,7 +248,7 @@ class DecryptingAudioDecoderTest : public testing::Test {
this, &DecryptingAudioDecoderTest::AbortAllPendingCBs));
decoder_.reset();
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
MOCK_METHOD1(FrameReady, void(const scoped_refptr<AudioBuffer>&));
@@ -391,7 +392,7 @@ TEST_F(DecryptingAudioDecoderTest, Reinitialize_ConfigChange) {
EXPECT_NE(new_config.samples_per_second(), config_.samples_per_second());
ReinitializeConfigChange(new_config);
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
// Test the case where the a key is added when the decryptor is in
@@ -405,7 +406,7 @@ TEST_F(DecryptingAudioDecoderTest, KeyAdded_DuringWaitingForKey) {
EXPECT_CALL(*this, FrameReady(decoded_frame_));
EXPECT_CALL(*this, DecodeDone(DecodeStatus::OK));
key_added_cb_.Run();
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
// Test the case where the a key is added when the decryptor is in
@@ -423,7 +424,7 @@ TEST_F(DecryptingAudioDecoderTest, KeyAdded_DruingPendingDecode) {
key_added_cb_.Run();
base::ResetAndReturn(&pending_audio_decode_cb_).Run(
Decryptor::kNoKey, Decryptor::AudioFrames());
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
// Test resetting when the decoder is in kIdle state but has not decoded any
« no previous file with comments | « media/filters/chunk_demuxer_unittest.cc ('k') | media/filters/decrypting_demuxer_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698