Index: mojo/public/bindings/js/test/harness.cc |
diff --git a/mojo/public/bindings/js/test/harness.cc b/mojo/public/bindings/js/test/harness.cc |
index b4b81f472ac1d4a7378412e8d1c3e546d31aa1ac..5b7319d718a08739f18f25316679d86cfc885508 100644 |
--- a/mojo/public/bindings/js/test/harness.cc |
+++ b/mojo/public/bindings/js/test/harness.cc |
@@ -32,6 +32,12 @@ class TestRunnerDelegate : public RunnerDelegate { |
} |
}; |
+std::string GetExceptionInfo(const v8::TryCatch& try_catch) { |
+ std::string info; |
+ gin::ConvertFromV8(try_catch.Message()->Get(), &info); |
+ return info; |
+} |
+ |
void RunTestFromFile(const base::FilePath& path) { |
EXPECT_TRUE(base::PathExists(path)) << path.LossyDisplayName(); |
std::string source; |
@@ -45,7 +51,7 @@ void RunTestFromFile(const base::FilePath& path) { |
v8::TryCatch try_catch; |
runner.Run(Script::New(gin::StringToV8(isolate, source))); |
- EXPECT_FALSE(try_catch.HasCaught()); |
+ EXPECT_FALSE(try_catch.HasCaught()) << GetExceptionInfo(try_catch); |
} |
void RunTest(std::string test) { |
@@ -64,6 +70,10 @@ TEST(Harness, mojo_unittests_js) { |
RunTest("mojo_unittests.js"); |
} |
+TEST(Harness, core_unittests_js) { |
+ RunTest("core_unittests.js"); |
+} |
+ |
} // namespace |
} // namespace js |
} // namespace mojo |