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

Unified Diff: media/filters/decrypting_video_decoder_unittest.cc

Issue 339653003: No EOS frame in {Audio|Video}Decoder::OutputCB. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/decrypting_video_decoder_unittest.cc
diff --git a/media/filters/decrypting_video_decoder_unittest.cc b/media/filters/decrypting_video_decoder_unittest.cc
index b0b05f457aaae5a7b62c007f8a36cd28a93e3f1a..578de90fc4e904732c2a8876233184d07a0f1b45 100644
--- a/media/filters/decrypting_video_decoder_unittest.cc
+++ b/media/filters/decrypting_video_decoder_unittest.cc
@@ -54,10 +54,6 @@ ACTION_P2(ResetAndRunCallback, callback, param) {
base::ResetAndReturn(callback).Run(param);
}
-MATCHER(IsEndOfStream, "end of stream") {
- return (arg->end_of_stream());
-}
-
} // namespace
class DecryptingVideoDecoderTest : public testing::Test {
@@ -72,8 +68,7 @@ class DecryptingVideoDecoderTest : public testing::Test {
encrypted_buffer_(CreateFakeEncryptedBuffer()),
decoded_video_frame_(VideoFrame::CreateBlackFrame(
TestVideoConfig::NormalCodedSize())),
- null_video_frame_(scoped_refptr<VideoFrame>()),
- end_of_stream_video_frame_(VideoFrame::CreateEOSFrame()) {
+ null_video_frame_(scoped_refptr<VideoFrame>()) {
EXPECT_CALL(*this, RequestDecryptorNotification(_))
.WillRepeatedly(RunCallbackIfNotNull(decryptor_.get()));
}
@@ -117,13 +112,8 @@ class DecryptingVideoDecoderTest : public testing::Test {
const scoped_refptr<DecoderBuffer>& buffer,
VideoDecoder::Status status,
const scoped_refptr<VideoFrame>& video_frame) {
- if (video_frame.get()) {
- if (video_frame->end_of_stream()) {
- EXPECT_CALL(*this, FrameReady(IsEndOfStream()));
- } else {
- EXPECT_CALL(*this, FrameReady(video_frame));
- }
- }
+ if (video_frame.get())
Sergey Ulanov 2014/06/16 23:49:32 nit: don't need .get() here.
xhwang 2014/06/17 18:56:35 This code is obsolete now.
+ EXPECT_CALL(*this, FrameReady(video_frame));
EXPECT_CALL(*this, DecodeDone(status));
decoder_->Decode(buffer,
@@ -147,9 +137,8 @@ class DecryptingVideoDecoderTest : public testing::Test {
// of stream state. This function must be called after
// EnterNormalDecodingState() to work.
void EnterEndOfStreamState() {
- ReadAndExpectFrameReadyWith(DecoderBuffer::CreateEOSBuffer(),
- VideoDecoder::kOk,
- end_of_stream_video_frame_);
+ ReadAndExpectFrameReadyWith(
+ DecoderBuffer::CreateEOSBuffer(), VideoDecoder::kOk, NULL);
}
// Make the video decode callback pending by saving and not firing it.
@@ -228,7 +217,6 @@ class DecryptingVideoDecoderTest : public testing::Test {
scoped_refptr<DecoderBuffer> encrypted_buffer_;
scoped_refptr<VideoFrame> decoded_video_frame_;
scoped_refptr<VideoFrame> null_video_frame_;
- scoped_refptr<VideoFrame> end_of_stream_video_frame_;
private:
DISALLOW_COPY_AND_ASSIGN(DecryptingVideoDecoderTest);

Powered by Google App Engine
This is Rietveld 408576698