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

Unified Diff: media/base/pipeline_unittest.cc

Issue 9155003: Fix media timeline so that thumb never exceeds buffered data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase ToT, again Created 8 years, 11 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/base/pipeline.cc ('k') | media/filters/audio_renderer_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline_unittest.cc
diff --git a/media/base/pipeline_unittest.cc b/media/base/pipeline_unittest.cc
index 58d1aa8ae3a623604428da90789f63d039c93a5b..ead6d82b6cdc013084bceafd7d669e06d46ced06 100644
--- a/media/base/pipeline_unittest.cc
+++ b/media/base/pipeline_unittest.cc
@@ -153,8 +153,8 @@ class PipelineTest : public ::testing::Test {
// Sets up expectations to allow the video renderer to initialize.
void InitializeVideoRenderer() {
EXPECT_CALL(*mocks_->video_renderer(),
- Initialize(mocks_->video_decoder(), _, _))
- .WillOnce(Invoke(&RunPipelineStatusCB3));
+ Initialize(mocks_->video_decoder(), _, _, _))
+ .WillOnce(Invoke(&RunPipelineStatusCB4));
EXPECT_CALL(*mocks_->video_renderer(), SetPlaybackRate(0.0f));
EXPECT_CALL(*mocks_->video_renderer(),
Seek(mocks_->demuxer()->GetStartTime(), _))
@@ -167,13 +167,13 @@ class PipelineTest : public ::testing::Test {
void InitializeAudioRenderer(bool disable_after_init_callback = false) {
if (disable_after_init_callback) {
EXPECT_CALL(*mocks_->audio_renderer(),
- Initialize(mocks_->audio_decoder(), _, _))
- .WillOnce(DoAll(Invoke(&RunPipelineStatusCB3),
+ Initialize(mocks_->audio_decoder(), _, _, _))
+ .WillOnce(DoAll(Invoke(&RunPipelineStatusCB4),
DisableAudioRenderer(mocks_->audio_renderer())));
} else {
EXPECT_CALL(*mocks_->audio_renderer(),
- Initialize(mocks_->audio_decoder(), _, _))
- .WillOnce(Invoke(&RunPipelineStatusCB3));
+ Initialize(mocks_->audio_decoder(), _, _, _))
+ .WillOnce(Invoke(&RunPipelineStatusCB4));
}
EXPECT_CALL(*mocks_->audio_renderer(), SetPlaybackRate(0.0f));
EXPECT_CALL(*mocks_->audio_renderer(), SetVolume(1.0f));
@@ -681,6 +681,10 @@ TEST_F(PipelineTest, AudioStreamShorterThanVideo) {
streams.push_back(audio_stream());
streams.push_back(video_stream());
+ // Replace the clock so we can simulate wallclock time advancing w/o using
+ // Sleep().
+ pipeline_->SetClockForTesting(new Clock(&StaticClockFunction));
+
InitializeDemuxer(&streams, duration);
InitializeAudioDecoder(audio_stream());
InitializeAudioRenderer();
@@ -691,10 +695,6 @@ TEST_F(PipelineTest, AudioStreamShorterThanVideo) {
// For convenience to simulate filters calling the methods.
FilterHost* host = pipeline_;
- // Replace the clock so we can simulate wallclock time advancing w/o using
- // Sleep().
- pipeline_->SetClockForTesting(new Clock(&StaticClockFunction));
-
EXPECT_EQ(0, host->GetTime().ToInternalValue());
float playback_rate = 1.0f;
« no previous file with comments | « media/base/pipeline.cc ('k') | media/filters/audio_renderer_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698