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

Unified Diff: media/base/test_data_util.cc

Issue 7658017: Revert 96974 - Remove mock_ffmpeg and update media unittests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/test_data_util.h ('k') | media/ffmpeg/ffmpeg_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/test_data_util.cc
===================================================================
--- media/base/test_data_util.cc (revision 96976)
+++ media/base/test_data_util.cc (working copy)
@@ -1,44 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "media/base/test_data_util.h"
-
-#include "base/file_util.h"
-#include "base/logging.h"
-#include "base/path_service.h"
-
-namespace media {
-
-void ReadTestDataFile(const std::string& name, scoped_array<uint8>* buffer,
- int* size) {
- FilePath file_path;
- CHECK(PathService::Get(base::DIR_SOURCE_ROOT, &file_path));
-
- file_path = file_path.Append(FILE_PATH_LITERAL("media"))
- .Append(FILE_PATH_LITERAL("test"))
- .Append(FILE_PATH_LITERAL("data"))
- .AppendASCII(name);
-
- int64 tmp = 0;
- CHECK(file_util::GetFileSize(file_path, &tmp))
- << "Failed to get file size for '" << name << "'";
-
- int file_size = static_cast<int>(tmp);
- buffer->reset(new uint8[file_size]);
-
- CHECK(file_size == file_util::ReadFile(file_path,
- reinterpret_cast<char*>(buffer->get()),
- file_size))
- << "Failed to read '" << name << "'";
- *size = file_size;
-}
-
-void ReadTestDataFile(const std::string& name, scoped_refptr<Buffer>* buffer) {
- scoped_array<uint8> buf;
- int buf_size;
- ReadTestDataFile(name, &buf, &buf_size);
- *buffer = new DataBuffer(buf.release(), buf_size);
-}
-
-} // namespace media
« no previous file with comments | « media/base/test_data_util.h ('k') | media/ffmpeg/ffmpeg_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698