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

Unified Diff: media/filters/video_frame_stream_unittest.cc

Issue 141243003: Add AudioBufferStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@decoderstream_rebased
Patch Set: Rebase! Created 6 years, 9 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
« no previous file with comments | « media/filters/video_decoder_selector_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/video_frame_stream_unittest.cc
diff --git a/media/filters/video_frame_stream_unittest.cc b/media/filters/video_frame_stream_unittest.cc
index 0b10b03771824d4fa0f4f7be06cf9af836848666..52a439e1b9548ae4bd80631ae9044855a7355486 100644
--- a/media/filters/video_frame_stream_unittest.cc
+++ b/media/filters/video_frame_stream_unittest.cc
@@ -26,14 +26,17 @@ static const int kDecodingDelay = 7;
namespace media {
-class VideoFrameStreamTest : public testing::TestWithParam<bool> {
+class VideoFrameStreamTest
+ : public testing::Test,
+ public testing::WithParamInterface<std::tr1::tuple<bool, bool> > {
public:
VideoFrameStreamTest()
: demuxer_stream_(new FakeDemuxerStream(kNumConfigs,
kNumBuffersInOneConfig,
- GetParam())),
+ IsEncrypted())),
decryptor_(new NiceMock<MockDecryptor>()),
- decoder_(new FakeVideoDecoder(kDecodingDelay)),
+ decoder_(
+ new FakeVideoDecoder(kDecodingDelay, IsGetDecodeOutputEnabled())),
is_initialized_(false),
num_decoded_frames_(0),
pending_initialize_(false),
@@ -70,6 +73,14 @@ class VideoFrameStreamTest : public testing::TestWithParam<bool> {
EXPECT_FALSE(is_initialized_);
}
+ bool IsEncrypted() {
+ return std::tr1::get<0>(GetParam());
+ }
+
+ bool IsGetDecodeOutputEnabled() {
+ return std::tr1::get<1>(GetParam());
+ }
+
MOCK_METHOD1(SetDecryptorReadyCallback, void(const media::DecryptorReadyCB&));
void OnStatistics(const PipelineStatistics& statistics) {
@@ -330,8 +341,14 @@ class VideoFrameStreamTest : public testing::TestWithParam<bool> {
DISALLOW_COPY_AND_ASSIGN(VideoFrameStreamTest);
};
-INSTANTIATE_TEST_CASE_P(Clear, VideoFrameStreamTest, testing::Values(false));
-INSTANTIATE_TEST_CASE_P(Encrypted, VideoFrameStreamTest, testing::Values(true));
+INSTANTIATE_TEST_CASE_P(Clear, VideoFrameStreamTest,
+ testing::Combine(testing::Values(false), testing::Values(false)));
+INSTANTIATE_TEST_CASE_P(Clear_GetDecodeOutput, VideoFrameStreamTest,
+ testing::Combine(testing::Values(false), testing::Values(true)));
+INSTANTIATE_TEST_CASE_P(Encrypted, VideoFrameStreamTest,
+ testing::Combine(testing::Values(true), testing::Values(false)));
+INSTANTIATE_TEST_CASE_P(Encrypted_GetDecodeOutput, VideoFrameStreamTest,
+ testing::Combine(testing::Values(true), testing::Values(true)));
TEST_P(VideoFrameStreamTest, Initialization) {
Initialize();
@@ -443,7 +460,7 @@ TEST_P(VideoFrameStreamTest, Stop_BeforeInitialization) {
}
TEST_P(VideoFrameStreamTest, Stop_DuringSetDecryptor) {
- if (!GetParam()) {
+ if (!IsEncrypted()) {
DVLOG(1) << "SetDecryptor test only runs when the stream is encrytped.";
return;
}
« no previous file with comments | « media/filters/video_decoder_selector_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698