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

Unified Diff: media/filters/decrypting_audio_decoder_unittest.cc

Issue 416333011: Allow setContentDecryptionModule() to get called when setting is done. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: const & Created 6 years, 5 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
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 83d7f5f36bdc9a7fec59aea600c9e2e9538f6953..ef43a2b4d6a9a1c57393e07efd8ae0ce85385eca 100644
--- a/media/filters/decrypting_audio_decoder_unittest.cc
+++ b/media/filters/decrypting_audio_decoder_unittest.cc
@@ -54,9 +54,9 @@ ACTION_P(ReturnBuffer, buffer) {
return buffer;
}
-ACTION_P(RunCallbackIfNotNull, param) {
+ACTION_P2(RunCallbackIfNotNull, p1, p2) {
if (!arg0.is_null())
- arg0.Run(param);
+ arg0.Run(p1, p2);
}
} // namespace
@@ -107,8 +107,8 @@ class DecryptingAudioDecoderTest : public testing::Test {
EXPECT_CALL(*decryptor_, InitializeAudioDecoder(_, _))
.Times(AtMost(1))
.WillOnce(RunCallback<1>(true));
- EXPECT_CALL(*this, RequestDecryptorNotification(_))
- .WillOnce(RunCallbackIfNotNull(decryptor_.get()));
+ EXPECT_CALL(*this, RequestDecryptorNotification(_)).WillOnce(
+ RunCallbackIfNotNull(decryptor_.get(), base::Bind(&base::DoNothing)));
ddorwin 2014/07/30 22:35:46 ditto
EXPECT_CALL(*decryptor_, RegisterNewKeyCB(Decryptor::kAudio, _))
.WillOnce(SaveArg<1>(&key_added_cb_));
@@ -294,8 +294,8 @@ TEST_F(DecryptingAudioDecoderTest, Initialize_InvalidAudioConfig) {
TEST_F(DecryptingAudioDecoderTest, Initialize_UnsupportedAudioConfig) {
EXPECT_CALL(*decryptor_, InitializeAudioDecoder(_, _))
.WillOnce(RunCallback<1>(false));
- EXPECT_CALL(*this, RequestDecryptorNotification(_))
- .WillOnce(RunCallbackIfNotNull(decryptor_.get()));
+ EXPECT_CALL(*this, RequestDecryptorNotification(_)).WillOnce(
+ RunCallbackIfNotNull(decryptor_.get(), base::Bind(&base::DoNothing)));
AudioDecoderConfig config(kCodecVorbis, kSampleFormatPlanarF32,
CHANNEL_LAYOUT_STEREO, kSampleRate, NULL, 0, true);
@@ -304,7 +304,8 @@ TEST_F(DecryptingAudioDecoderTest, Initialize_UnsupportedAudioConfig) {
TEST_F(DecryptingAudioDecoderTest, Initialize_NullDecryptor) {
EXPECT_CALL(*this, RequestDecryptorNotification(_))
- .WillRepeatedly(RunCallbackIfNotNull(static_cast<Decryptor*>(NULL)));
+ .WillRepeatedly(RunCallbackIfNotNull(static_cast<Decryptor*>(NULL),
+ base::Bind(&base::DoNothing)));
AudioDecoderConfig config(kCodecVorbis, kSampleFormatPlanarF32,
CHANNEL_LAYOUT_STEREO, kSampleRate, NULL, 0, true);

Powered by Google App Engine
This is Rietveld 408576698