diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-22 23:24:52 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-22 23:24:52 +0000 |
commit | 8c1be4e0311d52f07fe16fc091862957757dc002 (patch) | |
tree | a24bf3c06619ade183764c6240d1dfa6c10e52fe | |
parent | 8d4139f6fe7042310a9886dfb09c740e484ecfbb (diff) | |
download | chromium_src-8c1be4e0311d52f07fe16fc091862957757dc002.zip chromium_src-8c1be4e0311d52f07fe16fc091862957757dc002.tar.gz chromium_src-8c1be4e0311d52f07fe16fc091862957757dc002.tar.bz2 |
Removed message loop from MockPipeline as it is no longer needed.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/145022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18984 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | media/base/mock_pipeline.h | 16 | ||||
-rw-r--r-- | media/filters/ffmpeg_demuxer_unittest.cc | 10 |
2 files changed, 0 insertions, 26 deletions
diff --git a/media/base/mock_pipeline.h b/media/base/mock_pipeline.h index dd31ca6..01061c3 100644 --- a/media/base/mock_pipeline.h +++ b/media/base/mock_pipeline.h @@ -130,20 +130,6 @@ class MockPipeline : public media::Pipeline { total_bytes_ = 0; } - // Runs all queued tasks until there are no more. - // - // Although it is possible for tasks to run indefinitely (executing tasks post - // additional tasks), such situations should be treated as a bug. Since the - // pipeline is request/pull-based, only enough tasks to satisfy the request - // should ever be executed. - void RunAllTasks() { - message_loop_.RunAllPending(); - } - - void PostTask(Task* task) { - message_loop_.PostTask(FROM_HERE, task); - } - void Error(media::PipelineError error) { initialized_ = false; error_ = error; @@ -187,8 +173,6 @@ class MockPipeline : public media::Pipeline { int64 buffered_bytes_; int64 total_bytes_; - MessageLoop message_loop_; - DISALLOW_COPY_AND_ASSIGN(MockPipeline); }; diff --git a/media/filters/ffmpeg_demuxer_unittest.cc b/media/filters/ffmpeg_demuxer_unittest.cc index 619851c..2690fc4 100644 --- a/media/filters/ffmpeg_demuxer_unittest.cc +++ b/media/filters/ffmpeg_demuxer_unittest.cc @@ -347,7 +347,6 @@ TEST_F(FFmpegDemuxerTest, Read) { // Attempt a read from the audio stream and run the message loop until done. scoped_refptr<DemuxerStreamReader> reader(new DemuxerStreamReader()); reader->Read(audio); - pipeline_->RunAllTasks(); EXPECT_TRUE(reader->WaitForRead()); EXPECT_TRUE(reader->called()); ASSERT_TRUE(reader->buffer()); @@ -365,7 +364,6 @@ TEST_F(FFmpegDemuxerTest, Read) { // Attempt a read from the video stream and run the message loop until done. reader->Read(video); - pipeline_->RunAllTasks(); EXPECT_TRUE(reader->WaitForRead()); EXPECT_TRUE(reader->called()); ASSERT_TRUE(reader->buffer()); @@ -386,7 +384,6 @@ TEST_F(FFmpegDemuxerTest, Read) { // Attempt a read from the audio stream and run the message loop until done. reader->Read(audio); - pipeline_->RunAllTasks(); EXPECT_TRUE(reader->WaitForRead()); EXPECT_TRUE(reader->called()); ASSERT_TRUE(reader->buffer()); @@ -401,7 +398,6 @@ TEST_F(FFmpegDemuxerTest, Read) { // Attempt a read from the audio stream and run the message loop until done. reader->Read(video); - pipeline_->RunAllTasks(); EXPECT_TRUE(reader->WaitForRead()); EXPECT_TRUE(reader->called()); ASSERT_TRUE(reader->buffer()); @@ -486,7 +482,6 @@ TEST_F(FFmpegDemuxerTest, Seek) { // Read a video packet and release it. scoped_refptr<DemuxerStreamReader> reader(new DemuxerStreamReader()); reader->Read(video); - pipeline_->RunAllTasks(); EXPECT_TRUE(reader->WaitForRead()); EXPECT_TRUE(reader->called()); ASSERT_TRUE(reader->buffer()); @@ -509,7 +504,6 @@ TEST_F(FFmpegDemuxerTest, Seek) { // Audio read #1, should be discontinuous. reader->Read(audio); - pipeline_->RunAllTasks(); EXPECT_TRUE(reader->WaitForRead()); EXPECT_TRUE(reader->called()); ASSERT_TRUE(reader->buffer()); @@ -520,7 +514,6 @@ TEST_F(FFmpegDemuxerTest, Seek) { // Audio read #2, should not be discontinuous. reader->Reset(); reader->Read(audio); - pipeline_->RunAllTasks(); EXPECT_TRUE(reader->WaitForRead()); EXPECT_TRUE(reader->called()); ASSERT_TRUE(reader->buffer()); @@ -531,7 +524,6 @@ TEST_F(FFmpegDemuxerTest, Seek) { // Video read #1, should be discontinuous. reader->Reset(); reader->Read(video); - pipeline_->RunAllTasks(); EXPECT_TRUE(reader->WaitForRead()); EXPECT_TRUE(reader->called()); ASSERT_TRUE(reader->buffer()); @@ -542,7 +534,6 @@ TEST_F(FFmpegDemuxerTest, Seek) { // Video read #2, should not be discontinuous. reader->Reset(); reader->Read(video); - pipeline_->RunAllTasks(); EXPECT_TRUE(reader->WaitForRead()); EXPECT_TRUE(reader->called()); ASSERT_TRUE(reader->buffer()); @@ -596,7 +587,6 @@ TEST_F(FFmpegDemuxerTest, MP3Hack) { // contents should match. scoped_refptr<DemuxerStreamReader> reader = new DemuxerStreamReader(); reader->Read(audio); - pipeline_->RunAllTasks(); EXPECT_TRUE(reader->WaitForRead()); EXPECT_TRUE(reader->called()); ASSERT_TRUE(reader->buffer()); |