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

Unified Diff: mojo/bindings/js/run_js_tests.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/apps/js/test/run_apps_js_tests.cc ('k') | mojo/common/test/test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/bindings/js/run_js_tests.cc
diff --git a/mojo/bindings/js/run_js_tests.cc b/mojo/bindings/js/run_js_tests.cc
index c3349ccf7c91284e68bf15d873b696bb8f71d9aa..fcc42e074fdb6b9477034e6711981efed5bcc34c 100644
--- a/mojo/bindings/js/run_js_tests.cc
+++ b/mojo/bindings/js/run_js_tests.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/file_util.h"
+#include "base/files/file_path.h"
#include "base/path_service.h"
#include "gin/modules/console.h"
#include "gin/modules/module_registry.h"
@@ -11,6 +12,7 @@
#include "gin/test/gtest.h"
#include "mojo/bindings/js/core.h"
#include "mojo/bindings/js/unicode.h"
+#include "mojo/common/test/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace mojo {
@@ -45,13 +47,17 @@ TEST(JSTest, core) {
RunTest("core_unittests.js", true);
}
-// http://crbug.com/351214
-#if defined(OS_POSIX)
-#define MAYBE_codec DISABLED_codec
-#else
-#define MAYBE_codec codec
-#endif
-TEST(JSTest, MAYBE_codec) {
+TEST(JSTest, codec) {
+ // TODO(yzshen): Remove this check once isolated tests are supported on the
+ // Chromium waterfall. (http://crbug.com/351214)
+ const base::FilePath test_file_path(
+ test::GetFilePathForJSResource(
+ "mojo/public/interfaces/bindings/tests/sample_service.mojom"));
+ if (!base::PathExists(test_file_path)) {
+ LOG(WARNING) << "Mojom binding files don't exist. Skipping the test.";
+ return;
+ }
+
RunTest("codec_unittests.js", true);
}
« no previous file with comments | « mojo/apps/js/test/run_apps_js_tests.cc ('k') | mojo/common/test/test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698