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

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: 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..3c30a0ebab9dc450ba18d0a08af0ee63f12094c8 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);
@@ -711,6 +711,7 @@ TEST_F(ChunkDemuxerTest, TestInit) {
EXPECT_EQ(44100, config.samples_per_second());
EXPECT_TRUE(config.extra_data());
EXPECT_GT(config.extra_data_size(), 0u);
+ EXPECT_FALSE(audio_stream->is_encrypted());
} else {
EXPECT_FALSE(audio_stream);
}
@@ -719,6 +720,7 @@ TEST_F(ChunkDemuxerTest, TestInit) {
demuxer_->GetStream(DemuxerStream::VIDEO);
if (has_video) {
EXPECT_TRUE(video_stream);
+ EXPECT_EQ(is_video_encrypted, video_stream->is_encrypted());
} else {
EXPECT_FALSE(video_stream);
}

Powered by Google App Engine
This is Rietveld 408576698