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

Side by Side Diff: mojo/bindings/js/tests/run_js_tests.cc

Issue 708563002: Move mojo/public/js/bindings/ moves to mojo/public/js/ (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Sync again Created 6 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 unified diff | Download patch
« no previous file with comments | « mojo/bindings/js/support.cc ('k') | mojo/public/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/files/file_path.h" 5 #include "base/files/file_path.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "gin/modules/console.h" 7 #include "gin/modules/console.h"
8 #include "gin/modules/module_registry.h" 8 #include "gin/modules/module_registry.h"
9 #include "gin/modules/timer.h" 9 #include "gin/modules/timer.h"
10 #include "gin/test/file_runner.h" 10 #include "gin/test/file_runner.h"
(...skipping 19 matching lines...) Expand all
30 DISALLOW_COPY_AND_ASSIGN(TestRunnerDelegate); 30 DISALLOW_COPY_AND_ASSIGN(TestRunnerDelegate);
31 }; 31 };
32 32
33 void RunTest(std::string test, bool run_until_idle) { 33 void RunTest(std::string test, bool run_until_idle) {
34 Environment env; 34 Environment env;
35 base::FilePath path; 35 base::FilePath path;
36 PathService::Get(base::DIR_SOURCE_ROOT, &path); 36 PathService::Get(base::DIR_SOURCE_ROOT, &path);
37 path = path.AppendASCII("mojo") 37 path = path.AppendASCII("mojo")
38 .AppendASCII("public") 38 .AppendASCII("public")
39 .AppendASCII("js") 39 .AppendASCII("js")
40 .AppendASCII("bindings")
41 .AppendASCII(test); 40 .AppendASCII(test);
42 TestRunnerDelegate delegate; 41 TestRunnerDelegate delegate;
43 gin::RunTestFromFile(path, &delegate, run_until_idle); 42 gin::RunTestFromFile(path, &delegate, run_until_idle);
44 } 43 }
45 44
46 // TODO(abarth): Should we autogenerate these stubs from GYP? 45 // TODO(abarth): Should we autogenerate these stubs from GYP?
47 TEST(JSTest, core) { 46 TEST(JSTest, core) {
48 RunTest("core_unittests.js", true); 47 RunTest("core_unittests.js", true);
49 } 48 }
50 49
51 TEST(JSTest, codec) { 50 TEST(JSTest, codec) {
52 RunTest("codec_unittests.js", true); 51 RunTest("codec_unittests.js", true);
53 } 52 }
54 53
55 TEST(JSTest, struct) { 54 TEST(JSTest, struct) {
56 RunTest("struct_unittests.js", true); 55 RunTest("struct_unittests.js", true);
57 } 56 }
58 57
59 TEST(JSTest, validation) { 58 TEST(JSTest, validation) {
60 RunTest("validation_unittests.js", true); 59 RunTest("validation_unittests.js", true);
61 } 60 }
62 61
63 } // namespace 62 } // namespace
64 } // namespace js 63 } // namespace js
65 } // namespace mojo 64 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/bindings/js/support.cc ('k') | mojo/public/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698