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

Unified Diff: gin/test/run_js_tests.cc

Issue 62333018: Implement Asynchronous Module Definition API for Mojo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moar testing Created 7 years, 1 month 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
Index: gin/test/run_js_tests.cc
diff --git a/gin/test/run_js_tests.cc b/gin/test/run_js_tests.cc
new file mode 100644
index 0000000000000000000000000000000000000000..0b7c41a65aaee4cfffa68c54c43d8942b06e976a
--- /dev/null
+++ b/gin/test/run_js_tests.cc
@@ -0,0 +1,37 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/file_util.h"
+#include "base/path_service.h"
+#include "gin/test/file_runner.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace gin {
+namespace {
+
+base::FilePath BasePath() {
+ base::FilePath path;
+ PathService::Get(base::DIR_SOURCE_ROOT, &path);
+ return path.AppendASCII("gin");
+}
+
+void RunTest(const base::FilePath& path) {
+ FileRunnerDelegate delegate;
+ RunTestFromFile(path, &delegate);
+}
+
+TEST(JSTest, GTest) {
+ RunTest(BasePath()
+ .AppendASCII("test")
+ .AppendASCII("gtest_unittests.js"));
+}
+
+TEST(JSTest, ModuleRegistry) {
+ RunTest(BasePath()
+ .AppendASCII("modules")
+ .AppendASCII("module_registry_unittests.js"));
+}
+
+} // namespace
+} // gin
« gin/modules/module_registry.cc ('K') | « gin/test/gtest_unittests.js ('k') | mojo/mojo.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698