summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--media/base/mock_pipeline.h16
-rw-r--r--media/filters/ffmpeg_demuxer_unittest.cc10
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());