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 976a0b17591b90da5ba84d04ec2ad7d16f666d78..1ca1a8c1a87a8ffdddeb4272cd6421af3fc94dfc 100644 |
--- a/mojo/bindings/js/run_js_tests.cc |
+++ b/mojo/bindings/js/run_js_tests.cc |
@@ -45,7 +45,7 @@ TEST(JSTest, core) { |
RunTest("core_unittests.js", true); |
} |
-TEST(JSTest, codec) { |
+static bool MojoBindingFilesExist() { |
// TODO(yzshen): Remove this check once isolated tests are supported on the |
// Chromium waterfall. (http://crbug.com/351214) |
const base::FilePath test_file_path( |
@@ -53,12 +53,23 @@ TEST(JSTest, codec) { |
"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; |
+ return false; |
} |
+ return true; |
+} |
+TEST(JSTest, codec) { |
+ if (!MojoBindingFilesExist()) |
+ return; |
RunTest("codec_unittests.js", true); |
} |
+TEST(JSTest, validation) { |
+ if (!MojoBindingFilesExist()) |
+ return; |
+ RunTest("validation_unittests.js", true); |
+} |
+ |
} // namespace |
} // namespace js |
} // namespace mojo |