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

Side by Side Diff: media/ffmpeg/ffmpeg_unittest.cc

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | « ipc/ipc_channel_posix.cc ('k') | net/disk_cache/backend_unittest.cc » ('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 // ffmpeg_unittests verify that the parts of the FFmpeg API that Chromium uses 5 // ffmpeg_unittests verify that the parts of the FFmpeg API that Chromium uses
6 // function as advertised for each media format that Chromium supports. This 6 // function as advertised for each media format that Chromium supports. This
7 // mostly includes stuff like reporting proper timestamps, seeking to 7 // mostly includes stuff like reporting proper timestamps, seeking to
8 // keyframes, and supporting certain features like reordered_opaque. 8 // keyframes, and supporting certain features like reordered_opaque.
9 // 9 //
10 10
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 105 }
106 106
107 void OpenFile(const std::string& name) { 107 void OpenFile(const std::string& name) {
108 base::FilePath path; 108 base::FilePath path;
109 PathService::Get(base::DIR_SOURCE_ROOT, &path); 109 PathService::Get(base::DIR_SOURCE_ROOT, &path);
110 path = path.AppendASCII("media") 110 path = path.AppendASCII("media")
111 .AppendASCII("test") 111 .AppendASCII("test")
112 .AppendASCII("data") 112 .AppendASCII("data")
113 .AppendASCII("content") 113 .AppendASCII("content")
114 .AppendASCII(name.c_str()); 114 .AppendASCII(name.c_str());
115 EXPECT_TRUE(file_util::PathExists(path)); 115 EXPECT_TRUE(base::PathExists(path));
116 116
117 CHECK(file_data_.Initialize(path)); 117 CHECK(file_data_.Initialize(path));
118 protocol_.reset(new InMemoryUrlProtocol( 118 protocol_.reset(new InMemoryUrlProtocol(
119 file_data_.data(), file_data_.length(), false)); 119 file_data_.data(), file_data_.length(), false));
120 glue_.reset(new FFmpegGlue(protocol_.get())); 120 glue_.reset(new FFmpegGlue(protocol_.get()));
121 121
122 ASSERT_TRUE(glue_->OpenContext()) << "Could not open " << path.value(); 122 ASSERT_TRUE(glue_->OpenContext()) << "Could not open " << path.value();
123 av_format_context_ = glue_->format_context(); 123 av_format_context_ = glue_->format_context();
124 ASSERT_LE(0, avformat_find_stream_info(av_format_context_, NULL)) 124 ASSERT_LE(0, avformat_find_stream_info(av_format_context_, NULL))
125 << "Could not find stream information for " << path.value(); 125 << "Could not find stream information for " << path.value();
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 EXPECT_TRUE(StepDecodeVideo()); 580 EXPECT_TRUE(StepDecodeVideo());
581 VLOG(1) << decoded_video_time(); 581 VLOG(1) << decoded_video_time();
582 582
583 SeekTo(0.4); 583 SeekTo(0.4);
584 ReadRemainingFile(); 584 ReadRemainingFile();
585 EXPECT_TRUE(StepDecodeVideo()); 585 EXPECT_TRUE(StepDecodeVideo());
586 VLOG(1) << decoded_video_time(); 586 VLOG(1) << decoded_video_time();
587 } 587 }
588 588
589 } // namespace media 589 } // namespace media
OLDNEW
« no previous file with comments | « ipc/ipc_channel_posix.cc ('k') | net/disk_cache/backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698