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

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: 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..c9927aaa77d3537e373e22b843c115a6c4bb3edf 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
@@ -108,7 +108,7 @@ class DecryptingAudioDecoderTest : public testing::Test {
.Times(AtMost(1))
.WillOnce(RunCallback<1>(true));
EXPECT_CALL(*this, RequestDecryptorNotification(_))
- .WillOnce(RunCallbackIfNotNull(decryptor_.get()));
+ .WillOnce(RunCallbackIfNotNull(decryptor_.get(), base::Closure()));
EXPECT_CALL(*decryptor_, RegisterNewKeyCB(Decryptor::kAudio, _))
.WillOnce(SaveArg<1>(&key_added_cb_));
@@ -295,7 +295,7 @@ TEST_F(DecryptingAudioDecoderTest, Initialize_UnsupportedAudioConfig) {
EXPECT_CALL(*decryptor_, InitializeAudioDecoder(_, _))
.WillOnce(RunCallback<1>(false));
EXPECT_CALL(*this, RequestDecryptorNotification(_))
- .WillOnce(RunCallbackIfNotNull(decryptor_.get()));
+ .WillOnce(RunCallbackIfNotNull(decryptor_.get(), base::Closure()));
AudioDecoderConfig config(kCodecVorbis, kSampleFormatPlanarF32,
CHANNEL_LAYOUT_STEREO, kSampleRate, NULL, 0, true);
@@ -303,8 +303,8 @@ TEST_F(DecryptingAudioDecoderTest, Initialize_UnsupportedAudioConfig) {
}
TEST_F(DecryptingAudioDecoderTest, Initialize_NullDecryptor) {
- EXPECT_CALL(*this, RequestDecryptorNotification(_))
- .WillRepeatedly(RunCallbackIfNotNull(static_cast<Decryptor*>(NULL)));
+ EXPECT_CALL(*this, RequestDecryptorNotification(_)).WillRepeatedly(
+ RunCallbackIfNotNull(static_cast<Decryptor*>(NULL), base::Closure()));
AudioDecoderConfig config(kCodecVorbis, kSampleFormatPlanarF32,
CHANNEL_LAYOUT_STEREO, kSampleRate, NULL, 0, true);

Powered by Google App Engine
This is Rietveld 408576698