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

Unified Diff: mojo/public/js/bindings/tests/run_js_tests.cc

Issue 411553003: Validate incoming JS Message Headers: test message parser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed WebUIMojoTest.EndToEndPing Created 6 years, 5 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/public/js/bindings/tests/DEPS ('k') | mojo/public/js/bindings/tests/validation_test_input_parser.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/js/bindings/tests/run_js_tests.cc
diff --git a/mojo/bindings/js/run_js_tests.cc b/mojo/public/js/bindings/tests/run_js_tests.cc
similarity index 74%
rename from mojo/bindings/js/run_js_tests.cc
rename to mojo/public/js/bindings/tests/run_js_tests.cc
index 976a0b17591b90da5ba84d04ec2ad7d16f666d78..d791e0b8474744023d767d9ecbf60d72434095bf 100644
--- a/mojo/bindings/js/run_js_tests.cc
+++ b/mojo/public/js/bindings/tests/run_js_tests.cc
@@ -2,7 +2,6 @@
// 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/files/file_path.h"
#include "base/path_service.h"
#include "gin/modules/console.h"
@@ -11,7 +10,6 @@
#include "gin/test/file_runner.h"
#include "gin/test/gtest.h"
#include "mojo/bindings/js/core.h"
-#include "mojo/common/test/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace mojo {
@@ -33,8 +31,9 @@ void RunTest(std::string test, bool run_until_idle) {
base::FilePath path;
PathService::Get(base::DIR_SOURCE_ROOT, &path);
path = path.AppendASCII("mojo")
- .AppendASCII("bindings")
+ .AppendASCII("public")
.AppendASCII("js")
+ .AppendASCII("bindings")
.AppendASCII(test);
TestRunnerDelegate delegate;
gin::RunTestFromFile(path, &delegate, run_until_idle);
@@ -46,19 +45,13 @@ TEST(JSTest, core) {
}
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);
}
+TEST(JSTest, validation) {
+ RunTest("validation_unittests.js", true);
+}
+
} // namespace
} // namespace js
} // namespace mojo
« no previous file with comments | « mojo/public/js/bindings/tests/DEPS ('k') | mojo/public/js/bindings/tests/validation_test_input_parser.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698