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

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

Issue 10808087: Remove use of PipelineStatus from BufferedDataSource and FileDataSource. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: status -> success Created 8 years, 5 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/base/data_buffer.cc ('k') | media/filters/file_data_source.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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 175
176 FilePath file_path; 176 FilePath file_path;
177 EXPECT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &file_path)); 177 EXPECT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &file_path));
178 178
179 file_path = file_path.Append(FILE_PATH_LITERAL("media")) 179 file_path = file_path.Append(FILE_PATH_LITERAL("media"))
180 .Append(FILE_PATH_LITERAL("test")) 180 .Append(FILE_PATH_LITERAL("test"))
181 .Append(FILE_PATH_LITERAL("data")) 181 .Append(FILE_PATH_LITERAL("data"))
182 .AppendASCII(name); 182 .AppendASCII(name);
183 183
184 data_source_ = new FileDataSource(disable_file_size); 184 data_source_ = new FileDataSource(disable_file_size);
185 EXPECT_EQ(PIPELINE_OK, data_source_->Initialize(file_path.MaybeAsASCII())); 185 EXPECT_TRUE(data_source_->Initialize(file_path.MaybeAsASCII()));
186 } 186 }
187 187
188 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxerTest); 188 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxerTest);
189 }; 189 };
190 190
191 TEST_F(FFmpegDemuxerTest, Initialize_OpenFails) { 191 TEST_F(FFmpegDemuxerTest, Initialize_OpenFails) {
192 // Simulate avformat_open_input() failing. 192 // Simulate avformat_open_input() failing.
193 CreateDemuxer("ten_byte_file"), 193 CreateDemuxer("ten_byte_file"),
194 demuxer_->Initialize( 194 demuxer_->Initialize(
195 &host_, NewExpectedStatusCB(DEMUXER_ERROR_COULD_NOT_OPEN)); 195 &host_, NewExpectedStatusCB(DEMUXER_ERROR_COULD_NOT_OPEN));
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 TEST_F(FFmpegDemuxerTest, UnsupportedVideoSupportedAudioDemux) { 719 TEST_F(FFmpegDemuxerTest, UnsupportedVideoSupportedAudioDemux) {
720 CreateDemuxer("vorbis_audio_wmv_video.mkv"); 720 CreateDemuxer("vorbis_audio_wmv_video.mkv");
721 InitializeDemuxer(); 721 InitializeDemuxer();
722 722
723 // Ensure the expected streams are present. 723 // Ensure the expected streams are present.
724 EXPECT_FALSE(demuxer_->GetStream(DemuxerStream::VIDEO)); 724 EXPECT_FALSE(demuxer_->GetStream(DemuxerStream::VIDEO));
725 EXPECT_TRUE(demuxer_->GetStream(DemuxerStream::AUDIO)); 725 EXPECT_TRUE(demuxer_->GetStream(DemuxerStream::AUDIO));
726 } 726 }
727 727
728 } // namespace media 728 } // namespace media
OLDNEW
« no previous file with comments | « media/base/data_buffer.cc ('k') | media/filters/file_data_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698