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

Unified Diff: media/filters/decrypting_video_decoder_unittest.cc

Issue 1447533006: media: Pass SetCdmReadyCB in {Audio|Video}Decoder::Initialize(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/decrypting_video_decoder.cc ('k') | media/filters/fake_video_decoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 dba3e2e8d54bf0ec937e4050159c6ab0c633c427..5fcb74e196796967a59f89386ca3ee66c9997beb 100644
--- a/media/filters/decrypting_video_decoder_unittest.cc
+++ b/media/filters/decrypting_video_decoder_unittest.cc
@@ -57,8 +57,6 @@ class DecryptingVideoDecoderTest : public testing::Test {
: decoder_(new DecryptingVideoDecoder(
message_loop_.task_runner(),
new MediaLog(),
- base::Bind(&DecryptingVideoDecoderTest::RequestCdmNotification,
- base::Unretained(this)),
base::Bind(&DecryptingVideoDecoderTest::OnWaitingForDecryptionKey,
base::Unretained(this)))),
cdm_context_(new StrictMock<MockCdmContext>()),
@@ -97,9 +95,13 @@ class DecryptingVideoDecoderTest : public testing::Test {
// can succeed or fail.
void InitializeAndExpectResult(const VideoDecoderConfig& config,
bool success) {
- decoder_->Initialize(config, false, NewExpectedBoolCB(success),
- base::Bind(&DecryptingVideoDecoderTest::FrameReady,
- base::Unretained(this)));
+ decoder_->Initialize(
+ config, false,
+ base::Bind(&DecryptingVideoDecoderTest::RequestCdmNotification,
+ base::Unretained(this)),
+ NewExpectedBoolCB(success),
+ base::Bind(&DecryptingVideoDecoderTest::FrameReady,
+ base::Unretained(this)));
message_loop_.RunUntilIdle();
}
@@ -428,10 +430,13 @@ TEST_F(DecryptingVideoDecoderTest, Destroy_DuringDecryptorRequested) {
CdmReadyCB cdm_ready_cb;
EXPECT_CALL(*this, RequestCdmNotification(_))
.WillOnce(SaveArg<0>(&cdm_ready_cb));
- decoder_->Initialize(TestVideoConfig::NormalEncrypted(), false,
- NewExpectedBoolCB(false),
- base::Bind(&DecryptingVideoDecoderTest::FrameReady,
- base::Unretained(this)));
+ decoder_->Initialize(
+ TestVideoConfig::NormalEncrypted(), false,
+ base::Bind(&DecryptingVideoDecoderTest::RequestCdmNotification,
+ base::Unretained(this)),
+ NewExpectedBoolCB(false),
+ base::Bind(&DecryptingVideoDecoderTest::FrameReady,
+ base::Unretained(this)));
message_loop_.RunUntilIdle();
// |cdm_ready_cb| is saved but not called here.
EXPECT_FALSE(cdm_ready_cb.is_null());
« no previous file with comments | « media/filters/decrypting_video_decoder.cc ('k') | media/filters/fake_video_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698