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

Unified Diff: media/base/test_data_util.cc

Issue 2922323003: JDA unittest: don't require the test file in /media/test/data/. (Closed)
Patch Set: Created 3 years, 6 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/gpu/jpeg_decode_accelerator_unittest.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
diff --git a/media/base/test_data_util.cc b/media/base/test_data_util.cc
index 9fc6332e7c387afef948b3abeed71a8dffa67b66..0baa83830c882021c8086f88a2b1c6cec2dd80c6 100644
--- a/media/base/test_data_util.cc
+++ b/media/base/test_data_util.cc
@@ -38,6 +38,15 @@ base::FilePath GetTestDataPath() {
return base::FilePath(kTestDataPath);
}
+base::FilePath GetOriginalOrTestDataFilePath(const std::string& name) {
wuchengli 2017/06/08 02:44:32 It doesn't look like this class needs to provide t
mojahsu1 2017/06/12 07:29:44 Done.
+ base::FilePath original_file_path = base::FilePath(name);
+
+ if (PathExists(original_file_path))
+ return original_file_path;
+
+ return GetTestDataFilePath(name);
+}
+
std::string GetURLQueryString(const base::StringPairs& query_params) {
std::string query = "";
base::StringPairs::const_iterator itr = query_params.begin();
« no previous file with comments | « media/base/test_data_util.h ('k') | media/gpu/jpeg_decode_accelerator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698