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

Unified Diff: chrome/browser/media/webrtc_browsertest_common.cc

Issue 965403003: Making WebRTC quality tests less dependent on installed tools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor win fixes, improved error msg for rbga->i420, frame_analyzer Created 5 years, 10 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
Index: chrome/browser/media/webrtc_browsertest_common.cc
diff --git a/chrome/browser/media/webrtc_browsertest_common.cc b/chrome/browser/media/webrtc_browsertest_common.cc
index 34d35a7a94a34a47dbe4e6cf2f30b358f20d57af..f30ecf923946ef79701de29348e1d81bb4ba082b 100644
--- a/chrome/browser/media/webrtc_browsertest_common.cc
+++ b/chrome/browser/media/webrtc_browsertest_common.cc
@@ -45,6 +45,24 @@ base::FilePath GetReferenceFilesDir() {
return test_data_dir.Append(kReferenceFilesDirName);
}
+base::FilePath GetToolForPlatform(const std::string& tool_name) {
+ base::FilePath tools_dir =
+ GetReferenceFilesDir().Append(FILE_PATH_LITERAL("tools"));
+#if defined(OS_WIN)
+ return tools_dir
+ .Append(FILE_PATH_LITERAL("win"))
+ .AppendASCII(tool_name)
+ .AddExtension(FILE_PATH_LITERAL("exe"));
+#elif defined(OS_MACOSX)
+ return tools_dir.Append(FILE_PATH_LITERAL("mac")).AppendASCII(tool_name);
+#elif defined(OS_LINUX)
+ return tools_dir.Append(FILE_PATH_LITERAL("linux")).AppendASCII(tool_name);
+#else
+ CHECK(false) << "Can't retrieve tool " << tool_name << " on this platform.";
+ return base::FilePath();
+#endif
+}
+
bool HasReferenceFilesInCheckout() {
if (!base::PathExists(GetReferenceFilesDir())) {
LOG(ERROR)
« no previous file with comments | « chrome/browser/media/webrtc_browsertest_common.h ('k') | chrome/test/data/webrtc/resources/tools/libgomp-1.dll.sha1 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698