OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |