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

Unified Diff: media/filters/chunk_demuxer_unittest.cc

Issue 10910293: Add is_encrypted() in VideoDecoderConfig. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resolve comments. Created 8 years, 3 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/chunk_demuxer_unittest.cc
diff --git a/media/filters/chunk_demuxer_unittest.cc b/media/filters/chunk_demuxer_unittest.cc
index 598a4ca9b56c4398f9cebe6c1b23e441f0b380d0..c0346ca3e44bc3df0df1dd7c6af020b5e3915e63 100644
--- a/media/filters/chunk_demuxer_unittest.cc
+++ b/media/filters/chunk_demuxer_unittest.cc
@@ -683,21 +683,21 @@ class ChunkDemuxerTest : public testing::Test {
TEST_F(ChunkDemuxerTest, TestInit) {
// Test no streams, audio-only, video-only, and audio & video scenarios,
- // with video content encoded or not.
+ // with video encrypted or not.
for (int i = 0; i < 8; i++) {
bool has_audio = (i & 0x1) != 0;
bool has_video = (i & 0x2) != 0;
- bool video_content_encoded = (i & 0x4) != 0;
+ bool is_video_encrypted = (i & 0x4) != 0;
// No test on invalid combination.
- if (!has_video && video_content_encoded)
+ if (!has_video && is_video_encrypted)
continue;
CreateNewDemuxer();
- if (has_video && video_content_encoded)
+ if (has_video && is_video_encrypted)
EXPECT_CALL(*this, NeedKeyMock(NotNull(), 16));
- ASSERT_TRUE(InitDemuxer(has_audio, has_video, video_content_encoded));
+ ASSERT_TRUE(InitDemuxer(has_audio, has_video, is_video_encrypted));
scoped_refptr<DemuxerStream> audio_stream =
demuxer_->GetStream(DemuxerStream::AUDIO);
@@ -719,6 +719,8 @@ TEST_F(ChunkDemuxerTest, TestInit) {
demuxer_->GetStream(DemuxerStream::VIDEO);
if (has_video) {
EXPECT_TRUE(video_stream);
+ EXPECT_EQ(is_video_encrypted,
+ video_stream->video_decoder_config().is_encrypted());
} else {
EXPECT_FALSE(video_stream);
}
@@ -1160,7 +1162,6 @@ TEST_F(ChunkDemuxerTest, TestReadsAfterEndOfStream) {
// Make sure AppendData() will accept elements that span multiple calls.
TEST_F(ChunkDemuxerTest, TestAppendingInPieces) {
-
EXPECT_CALL(*this, DemuxerOpened());
demuxer_->Initialize(
&host_, CreateInitDoneCB(kDefaultDuration(), PIPELINE_OK));

Powered by Google App Engine
This is Rietveld 408576698