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

Unified Diff: media/filters/decrypting_video_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_video_decoder_unittest.cc
diff --git a/media/filters/decrypting_video_decoder_unittest.cc b/media/filters/decrypting_video_decoder_unittest.cc
index ed956ea1d51e0a172fb9e09cb7edc2f854dafddc..2e17c1f9d3c32bc3e25627e3c186aae42346d1a7 100644
--- a/media/filters/decrypting_video_decoder_unittest.cc
+++ b/media/filters/decrypting_video_decoder_unittest.cc
@@ -44,13 +44,13 @@ static scoped_refptr<DecoderBuffer> CreateFakeEncryptedBuffer() {
// times across multiple test files. Sadly we can't use static for them.
namespace {
-ACTION_P(RunCallbackIfNotNull, param) {
+ACTION_P2(RunCallbackIfNotNull, p1, p2) {
if (!arg0.is_null())
- arg0.Run(param);
+ arg0.Run(p1, p2);
}
-ACTION_P2(ResetAndRunCallback, callback, param) {
- base::ResetAndReturn(callback).Run(param);
+ACTION_P3(ResetAndRunCallback, callback, p1, p2) {
+ base::ResetAndReturn(callback).Run(p1, p2);
}
} // namespace
@@ -70,8 +70,8 @@ class DecryptingVideoDecoderTest : public testing::Test {
decoded_video_frame_(VideoFrame::CreateBlackFrame(
TestVideoConfig::NormalCodedSize())),
null_video_frame_(scoped_refptr<VideoFrame>()) {
- EXPECT_CALL(*this, RequestDecryptorNotification(_))
- .WillRepeatedly(RunCallbackIfNotNull(decryptor_.get()));
+ EXPECT_CALL(*this, RequestDecryptorNotification(_)).WillRepeatedly(
+ RunCallbackIfNotNull(decryptor_.get(), base::Bind(&base::DoNothing)));
ddorwin 2014/07/30 22:35:46 ditto
}
virtual ~DecryptingVideoDecoderTest() {
@@ -250,7 +250,8 @@ TEST_F(DecryptingVideoDecoderTest, Initialize_Normal) {
TEST_F(DecryptingVideoDecoderTest, Initialize_NullDecryptor) {
EXPECT_CALL(*this, RequestDecryptorNotification(_))
- .WillRepeatedly(RunCallbackIfNotNull(static_cast<Decryptor*>(NULL)));
+ .WillRepeatedly(RunCallbackIfNotNull(static_cast<Decryptor*>(NULL),
+ base::Bind(&base::DoNothing)));
InitializeAndExpectStatus(TestVideoConfig::NormalEncrypted(),
DECODER_ERROR_NOT_SUPPORTED);
}
@@ -417,7 +418,8 @@ TEST_F(DecryptingVideoDecoderTest, Destroy_DuringDecryptorRequested) {
// NULL callback to cancel the |decryptor_ready_cb|.
EXPECT_CALL(*this, RequestDecryptorNotification(IsNullCallback()))
.WillOnce(ResetAndRunCallback(&decryptor_ready_cb,
- reinterpret_cast<Decryptor*>(NULL)));
+ reinterpret_cast<Decryptor*>(NULL),
+ base::Bind(&base::DoNothing)));
Destroy();
}

Powered by Google App Engine
This is Rietveld 408576698