Index: mojo/common/test/test_utils_posix.cc |
diff --git a/mojo/common/test/test_utils_posix.cc b/mojo/common/test/test_utils_posix.cc |
index 254d0a87690988b035eea6608e55f118a812a75d..b99ad3b636e2eaa97588dcb83d96aed1254290ae 100644 |
--- a/mojo/common/test/test_utils_posix.cc |
+++ b/mojo/common/test/test_utils_posix.cc |
@@ -7,6 +7,8 @@ |
#include <fcntl.h> |
#include <unistd.h> |
+#include "base/base_paths.h" |
+#include "base/path_service.h" |
#include "base/posix/eintr_wrapper.h" |
#include "mojo/embedder/platform_handle.h" |
@@ -73,5 +75,12 @@ bool NonBlockingRead(const embedder::PlatformHandle& handle, |
return true; |
} |
+base::FilePath GetFilePathForJSResource(const std::string& path) { |
+ std::string binding_path = "gen/" + path + ".js"; |
+ base::FilePath exe_dir; |
+ PathService::Get(base::DIR_EXE, &exe_dir); |
+ return exe_dir.AppendASCII(binding_path); |
+} |
+ |
} // namespace test |
} // namespace mojo |