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) |