Skip to content

Commit

Permalink
Mac Valgrind Unittest Failure Fix
Browse files Browse the repository at this point in the history
BUG=530688

Review URL: https://codereview.chromium.org/1348853005

Cr-Commit-Position: refs/heads/master@{#349945}
  • Loading branch information
qiangchen authored and Commit bot committed Sep 21, 2015
1 parent fd91805 commit 1b3e9ba
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
15 changes: 15 additions & 0 deletions media/renderers/video_renderer_impl_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,14 @@ TEST_P(VideoRendererImplTest, DecodeError_Playing) {
Initialize();
QueueFrames("0 10 20 30");
EXPECT_CALL(mock_cb_, FrameReceived(_)).Times(testing::AtLeast(1));

// Consider the case that rendering is faster than we setup the test event.
// In that case, when we run out of the frames, BUFFERING_HAVE_NOTHING will
// be called.
EXPECT_CALL(mock_cb_, BufferingStateChange(BUFFERING_HAVE_ENOUGH));
EXPECT_CALL(mock_cb_, BufferingStateChange(BUFFERING_HAVE_NOTHING))
.Times(testing::AtMost(1));

StartPlayingFrom(0);
renderer_->OnTimeStateChanged(true);
time_source_.StartTicking();
Expand Down Expand Up @@ -692,6 +699,14 @@ TEST_P(VideoRendererImplTest, RenderingStartedThenStopped) {
EXPECT_EQ(0u, last_pipeline_statistics_.video_frames_dropped);
}

// Consider the case that rendering is faster than we setup the test event.
// In that case, when we run out of the frames, BUFFERING_HAVE_NOTHING will
// be called. And then during SatisfyPendingReadWithEndOfStream,
// BUFFER_HAVE_ENOUGH will be called again.
EXPECT_CALL(mock_cb_, BufferingStateChange(BUFFERING_HAVE_ENOUGH))
.Times(testing::AtMost(1));
EXPECT_CALL(mock_cb_, BufferingStateChange(BUFFERING_HAVE_NOTHING))
.Times(testing::AtMost(1));
renderer_->OnTimeStateChanged(true);
time_source_.StartTicking();

Expand Down

This file was deleted.

0 comments on commit 1b3e9ba

Please sign in to comment.