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

Unified Diff: media/test/pipeline_integration_test.cc

Issue 935243002: Decryptors can report kNoKey to WebMediaPlayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android changes Created 5 years, 10 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/test/pipeline_integration_test.cc
diff --git a/media/test/pipeline_integration_test.cc b/media/test/pipeline_integration_test.cc
index c2e23f8f2165c8b2c43b8356e03a325e01b62d3f..55bba587c4cf2d19c1149d10135cfcb58a7cf48b 100644
--- a/media/test/pipeline_integration_test.cc
+++ b/media/test/pipeline_integration_test.cc
@@ -659,6 +659,10 @@ class PipelineIntegrationTest : public PipelineIntegrationTestHost {
.WillRepeatedly(SaveArg<0>(&metadata_));
EXPECT_CALL(*this, OnBufferingStateChanged(BUFFERING_HAVE_ENOUGH))
.Times(AtMost(1));
+
+ // Encrypted content not used, so this is never called.
+ EXPECT_CALL(*this, OnWaitingForDecryptionKey()).Times(0);
+
demuxer_ = source->GetDemuxer().Pass();
pipeline_->Start(
demuxer_.get(), CreateRenderer(),
@@ -673,7 +677,9 @@ class PipelineIntegrationTest : public PipelineIntegrationTestHost {
base::Bind(&PipelineIntegrationTest::OnVideoFramePaint,
base::Unretained(this)),
base::Closure(), base::Bind(&PipelineIntegrationTest::OnAddTextTrack,
- base::Unretained(this)));
+ base::Unretained(this)),
+ base::Bind(&PipelineIntegrationTest::OnWaitingForDecryptionKey,
+ base::Unretained(this)));
message_loop_.Run();
EXPECT_EQ(PIPELINE_OK, pipeline_status_);
}
@@ -694,6 +700,10 @@ class PipelineIntegrationTest : public PipelineIntegrationTestHost {
.Times(AtMost(1));
EXPECT_CALL(*this, DecryptorAttached(true));
+ // Encrypted content used but keys provided in advance, so this is
+ // never called.
+ EXPECT_CALL(*this, OnWaitingForDecryptionKey()).Times(0);
+
demuxer_ = source->GetDemuxer().Pass();
pipeline_->SetCdm(encrypted_media->GetCdmContext(),
@@ -713,7 +723,9 @@ class PipelineIntegrationTest : public PipelineIntegrationTestHost {
base::Bind(&PipelineIntegrationTest::OnVideoFramePaint,
base::Unretained(this)),
base::Closure(), base::Bind(&PipelineIntegrationTest::OnAddTextTrack,
- base::Unretained(this)));
+ base::Unretained(this)),
+ base::Bind(&PipelineIntegrationTest::OnWaitingForDecryptionKey,
+ base::Unretained(this)));
source->set_encrypted_media_init_data_cb(
base::Bind(&FakeEncryptedMedia::OnEncryptedMediaInitData,

Powered by Google App Engine
This is Rietveld 408576698