Index: mojo/apps/js/test/run_apps_js_tests.cc |
diff --git a/mojo/apps/js/test/run_apps_js_tests.cc b/mojo/apps/js/test/run_apps_js_tests.cc |
index 5037f8a3526c2793d3d42a1625188fcc10866a36..de964e7dde34904c163b3ca7c7239befa8678f1e 100644 |
--- a/mojo/apps/js/test/run_apps_js_tests.cc |
+++ b/mojo/apps/js/test/run_apps_js_tests.cc |
@@ -3,8 +3,8 @@ |
// found in the LICENSE file. |
#include "base/file_util.h" |
+#include "base/files/file_path.h" |
#include "base/path_service.h" |
-#include "build/build_config.h" |
#include "gin/modules/console.h" |
#include "gin/modules/module_registry.h" |
#include "gin/modules/timer.h" |
@@ -14,6 +14,7 @@ |
#include "mojo/apps/js/bindings/threading.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 { |
@@ -50,23 +51,31 @@ void RunTest(std::string test, bool run_until_idle) { |
// TODO(abarth): Should we autogenerate these stubs from GYP? |
-// http://crbug.com/351214 |
-#if defined(OS_POSIX) |
-#define MAYBE_sample_test DISABLED_sample_test |
-#else |
-#define MAYBE_sample_test sample_test |
-#endif |
-TEST(JSTest, MAYBE_sample_test) { |
+TEST(JSTest, sample_test) { |
+ // 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("sample_service_unittests.js", true); |
} |
-// http://crbug.com/351214 |
-#if defined(OS_POSIX) |
-#define MAYBE_connection DISABLED_connection |
-#else |
-#define MAYBE_connection connection |
-#endif |
-TEST(JSTest, MAYBE_connection) { |
+TEST(JSTest, connection) { |
+ // 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("connection_unittests.js", false); |
} |