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

Unified Diff: media/filters/decrypting_demuxer_stream_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_demuxer_stream_unittest.cc
diff --git a/media/filters/decrypting_demuxer_stream_unittest.cc b/media/filters/decrypting_demuxer_stream_unittest.cc
index fec56248e0bc97e5063ed3b8eaa244e3e0b8a584..d125bef81d14869a35eed3d354fca1968e05e2e4 100644
--- a/media/filters/decrypting_demuxer_stream_unittest.cc
+++ b/media/filters/decrypting_demuxer_stream_unittest.cc
@@ -53,9 +53,9 @@ ACTION_P(ReturnBuffer, buffer) {
// Sets the |decryptor| if the DecryptorReadyCB (arg0) is not null. Sets
// |is_decryptor_set| to true if a non-NULL |decryptor| has been set through the
// callback.
-ACTION_P2(SetDecryptorIfNotNull, decryptor, is_decryptor_set) {
+ACTION_P3(SetDecryptorIfNotNull, decryptor, done_cb, is_decryptor_set) {
if (!arg0.is_null())
- arg0.Run(decryptor);
+ arg0.Run(decryptor, done_cb);
*is_decryptor_set = !arg0.is_null() && decryptor;
}
@@ -119,7 +119,9 @@ class DecryptingDemuxerStreamTest : public testing::Test {
void Initialize() {
EXPECT_CALL(*this, RequestDecryptorNotification(_))
- .WillOnce(SetDecryptorIfNotNull(decryptor_.get(), &is_decryptor_set_));
+ .WillOnce(SetDecryptorIfNotNull(decryptor_.get(),
+ base::Bind(&base::DoNothing),
ddorwin 2014/07/30 22:35:46 ditto
+ &is_decryptor_set_));
EXPECT_CALL(*decryptor_, RegisterNewKeyCB(Decryptor::kAudio, _))
.WillOnce(SaveArg<1>(&key_added_cb_));
@@ -277,7 +279,8 @@ TEST_F(DecryptingDemuxerStreamTest, Initialize_NormalAudio) {
TEST_F(DecryptingDemuxerStreamTest, Initialize_NormalVideo) {
EXPECT_CALL(*this, RequestDecryptorNotification(_))
- .WillOnce(SetDecryptorIfNotNull(decryptor_.get(), &is_decryptor_set_));
+ .WillOnce(SetDecryptorIfNotNull(
+ decryptor_.get(), base::Bind(&base::DoNothing), &is_decryptor_set_));
EXPECT_CALL(*decryptor_, RegisterNewKeyCB(Decryptor::kVideo, _))
.WillOnce(SaveArg<1>(&key_added_cb_));
@@ -305,6 +308,7 @@ TEST_F(DecryptingDemuxerStreamTest, Initialize_NormalVideo) {
TEST_F(DecryptingDemuxerStreamTest, Initialize_NullDecryptor) {
EXPECT_CALL(*this, RequestDecryptorNotification(_))
.WillRepeatedly(SetDecryptorIfNotNull(static_cast<Decryptor*>(NULL),
+ base::Bind(&base::DoNothing),
&is_decryptor_set_));
AudioDecoderConfig input_config(kCodecVorbis, kSampleFormatPlanarF32,

Powered by Google App Engine
This is Rietveld 408576698