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

Side by Side Diff: media/filters/ffmpeg_demuxer_unittest.cc

Issue 10855051: Use enum instead of string in MessageLoopFactory::GetMessageLoop* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/filters/ffmpeg_demuxer.cc ('k') | media/filters/ffmpeg_video_decoder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <algorithm> 5 #include <algorithm>
6 #include <deque> 6 #include <deque>
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 } 76 }
77 77
78 void CreateDemuxer(const std::string& name, bool disable_file_size) { 78 void CreateDemuxer(const std::string& name, bool disable_file_size) {
79 CHECK(!demuxer_); 79 CHECK(!demuxer_);
80 80
81 EXPECT_CALL(host_, SetTotalBytes(_)).Times(AnyNumber()); 81 EXPECT_CALL(host_, SetTotalBytes(_)).Times(AnyNumber());
82 EXPECT_CALL(host_, AddBufferedByteRange(_, _)).Times(AnyNumber()); 82 EXPECT_CALL(host_, AddBufferedByteRange(_, _)).Times(AnyNumber());
83 EXPECT_CALL(host_, AddBufferedTimeRange(_, _)).Times(AnyNumber()); 83 EXPECT_CALL(host_, AddBufferedTimeRange(_, _)).Times(AnyNumber());
84 84
85 CreateDataSource(name, disable_file_size); 85 CreateDataSource(name, disable_file_size);
86 demuxer_ = new FFmpegDemuxer(&message_loop_, data_source_); 86 demuxer_ = new FFmpegDemuxer(message_loop_.message_loop_proxy(),
87 data_source_);
87 } 88 }
88 89
89 MOCK_METHOD1(CheckPoint, void(int v)); 90 MOCK_METHOD1(CheckPoint, void(int v));
90 91
91 void InitializeDemuxer() { 92 void InitializeDemuxer() {
92 EXPECT_CALL(host_, SetDuration(_)); 93 EXPECT_CALL(host_, SetDuration(_));
93 demuxer_->Initialize(&host_, NewExpectedStatusCB(PIPELINE_OK)); 94 demuxer_->Initialize(&host_, NewExpectedStatusCB(PIPELINE_OK));
94 message_loop_.RunAllPending(); 95 message_loop_.RunAllPending();
95 } 96 }
96 97
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 TEST_F(FFmpegDemuxerTest, UnsupportedVideoSupportedAudioDemux) { 691 TEST_F(FFmpegDemuxerTest, UnsupportedVideoSupportedAudioDemux) {
691 CreateDemuxer("vorbis_audio_wmv_video.mkv"); 692 CreateDemuxer("vorbis_audio_wmv_video.mkv");
692 InitializeDemuxer(); 693 InitializeDemuxer();
693 694
694 // Ensure the expected streams are present. 695 // Ensure the expected streams are present.
695 EXPECT_FALSE(demuxer_->GetStream(DemuxerStream::VIDEO)); 696 EXPECT_FALSE(demuxer_->GetStream(DemuxerStream::VIDEO));
696 EXPECT_TRUE(demuxer_->GetStream(DemuxerStream::AUDIO)); 697 EXPECT_TRUE(demuxer_->GetStream(DemuxerStream::AUDIO));
697 } 698 }
698 699
699 } // namespace media 700 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_demuxer.cc ('k') | media/filters/ffmpeg_video_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698