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

Unified Diff: mojo/common/test/test_utils_win.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_posix.cc ('k') | mojo/mojo.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/common/test/test_utils_win.cc
diff --git a/mojo/common/test/test_utils_win.cc b/mojo/common/test/test_utils_win.cc
index 97ec4665d019a21701d6c3a949929c3b45820ae7..aaabc01c00c5799dca75eda75b5743f5627b3e36 100644
--- a/mojo/common/test/test_utils_win.cc
+++ b/mojo/common/test/test_utils_win.cc
@@ -6,6 +6,9 @@
#include <windows.h>
+#include "base/base_paths.h"
+#include "base/path_service.h"
+#include "base/strings/string_util.h"
#include "mojo/embedder/platform_handle.h"
namespace mojo {
@@ -76,5 +79,13 @@ bool NonBlockingRead(const embedder::PlatformHandle& handle,
return true;
}
+base::FilePath GetFilePathForJSResource(const std::string& path) {
+ std::string binding_path = "gen/" + path + ".js";
+ base::ReplaceChars(binding_path, "//", "\\", &binding_path);
+ 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_posix.cc ('k') | mojo/mojo.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698