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

Unified Diff: mojo/common/test/test_utils_posix.cc

Issue 253413004: Enable mojo js tests which depend on mojom.js files in gen/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 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 | « mojo/common/test/test_utils.h ('k') | mojo/common/test/test_utils_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « mojo/common/test/test_utils.h ('k') | mojo/common/test/test_utils_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698