Index: media/filters/video_renderer_impl_unittest.cc |
diff --git a/media/filters/video_renderer_impl_unittest.cc b/media/filters/video_renderer_impl_unittest.cc |
index 592090cfd638677914cc1de9734113d886cad3ab..1df10624094b70c87c7b5e73156b8f0066ccfc8e 100644 |
--- a/media/filters/video_renderer_impl_unittest.cc |
+++ b/media/filters/video_renderer_impl_unittest.cc |
@@ -43,10 +43,6 @@ MATCHER_P(HasTimestamp, ms, "") { |
return arg->timestamp().InMilliseconds() == ms; |
} |
-// Arbitrary value. Has to be larger to cover any timestamp value used in tests |
-// and kTimeToDeclareHaveNothing. |
-static const int kVideoDurationInMs = 10000; |
- |
class VideoRendererImplTest : public ::testing::Test { |
public: |
VideoRendererImplTest() |
@@ -71,15 +67,10 @@ class VideoRendererImplTest : public ::testing::Test { |
scoped_refptr<DecoderBuffer>(new DecoderBuffer(0)))); |
EXPECT_CALL(statistics_cb_object_, OnStatistics(_)) |
.Times(AnyNumber()); |
- EXPECT_CALL(*this, OnTimeUpdate(_)) |
- .Times(AnyNumber()); |
} |
virtual ~VideoRendererImplTest() {} |
- // Callbacks passed into Initialize(). |
- MOCK_METHOD1(OnTimeUpdate, void(base::TimeDelta)); |
- |
void Initialize() { |
InitializeWithLowDelay(false); |
} |
@@ -114,15 +105,11 @@ class VideoRendererImplTest : public ::testing::Test { |
status_cb, |
base::Bind(&MockStatisticsCB::OnStatistics, |
base::Unretained(&statistics_cb_object_)), |
- base::Bind(&VideoRendererImplTest::OnTimeUpdate, |
- base::Unretained(this)), |
base::Bind(&StrictMock<MockCB>::BufferingStateChange, |
base::Unretained(&mock_cb_)), |
ended_event_.GetClosure(), |
error_event_.GetPipelineStatusCB(), |
- base::Bind(&VideoRendererImplTest::GetTime, base::Unretained(this)), |
- base::Bind(&VideoRendererImplTest::GetDuration, |
- base::Unretained(this))); |
+ base::Bind(&VideoRendererImplTest::GetTime, base::Unretained(this))); |
} |
void StartPlaying() { |
@@ -257,7 +244,6 @@ class VideoRendererImplTest : public ::testing::Test { |
DCHECK_EQ(&message_loop_, base::MessageLoop::current()); |
base::AutoLock l(lock_); |
time_ += base::TimeDelta::FromMilliseconds(time_ms); |
- DCHECK_LE(time_.InMicroseconds(), GetDuration().InMicroseconds()); |
} |
protected: |
@@ -281,10 +267,6 @@ class VideoRendererImplTest : public ::testing::Test { |
return time_; |
} |
- base::TimeDelta GetDuration() { |
- return base::TimeDelta::FromMilliseconds(kVideoDurationInMs); |
- } |
- |
void DecodeRequested(const scoped_refptr<DecoderBuffer>& buffer, |
const VideoDecoder::DecodeCB& decode_cb) { |
DCHECK_EQ(&message_loop_, base::MessageLoop::current()); |
@@ -393,29 +375,6 @@ TEST_F(VideoRendererImplTest, FlushWithNothingBuffered) { |
Destroy(); |
} |
-TEST_F(VideoRendererImplTest, EndOfStream_ClipDuration) { |
- Initialize(); |
- QueueFrames("0"); |
- EXPECT_CALL(mock_cb_, Display(HasTimestamp(0))); |
- EXPECT_CALL(mock_cb_, BufferingStateChange(BUFFERING_HAVE_ENOUGH)); |
- StartPlaying(); |
- |
- // Next frame has timestamp way past duration. Its timestamp will be adjusted |
- // to match the duration of the video. |
- QueueFrames(base::IntToString(kVideoDurationInMs + 1000)); |
- SatisfyPendingRead(); |
- WaitForPendingRead(); |
- |
- // Queue the end of stream frame and wait for the last frame to be rendered. |
- SatisfyPendingReadWithEndOfStream(); |
- |
- EXPECT_CALL(mock_cb_, Display(HasTimestamp(kVideoDurationInMs))); |
- AdvanceTimeInMs(kVideoDurationInMs); |
- WaitForEnded(); |
- |
- Destroy(); |
-} |
- |
TEST_F(VideoRendererImplTest, DecodeError_Playing) { |
Initialize(); |
QueueFrames("0 10 20 30"); |