OLD | NEW |
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 import("//mojo/public/tools/bindings/mojom.gni") | 5 import("//mojo/public/tools/bindings/mojom.gni") |
6 import("//testing/test.gni") | 6 import("//testing/test.gni") |
7 | 7 |
8 # TODO(hansmuller): The organization of tests in this directory is weird: | 8 # TODO(hansmuller): The organization of tests in this directory is weird: |
9 # * Really, js_unittests tests public stuff, so that should live in public | 9 # * Really, js_unittests tests public stuff, so that should live in public |
10 # and be reworked as some sort of apptest. | 10 # and be reworked as some sort of apptest. |
11 # * Both js_unittests and js_integration_tests should auto-generate their | 11 # * Both js_unittests and js_integration_tests should auto-generate their |
12 # tests somehow. The .cc files are just test runner stubs, including | 12 # tests somehow. The .cc files are just test runner stubs, including |
13 # explicit lists of .js files. | 13 # explicit lists of .js files. |
14 | 14 |
15 group("tests") { | 15 group("tests") { |
16 testonly = true | 16 testonly = true |
17 deps = [ | 17 deps = [ |
18 ":mojo_js_integration_tests", | |
19 ":mojo_js_unittests", | 18 ":mojo_js_unittests", |
20 ] | 19 ] |
21 } | 20 } |
22 | 21 |
23 test("mojo_js_integration_tests") { | |
24 deps = [ | |
25 ":js_to_cpp_bindings", | |
26 "//base/test:test_support", | |
27 "//gin:gin_test", | |
28 "//mojo/common", | |
29 "//mojo/edk/js", | |
30 "//mojo/edk/test:run_all_unittests", | |
31 "//mojo/public/cpp/bindings", | |
32 "//mojo/public/cpp/system", | |
33 "//mojo/public/js:bindings", | |
34 ] | |
35 | |
36 sources = [ | |
37 "js_to_cpp_tests.cc", | |
38 ] | |
39 | |
40 data = [ | |
41 "js_to_cpp_tests.js", | |
42 ] | |
43 | |
44 configs += [ "//v8:external_startup_data" ] | |
45 } | |
46 | |
47 mojom("js_to_cpp_bindings") { | |
48 sources = [ | |
49 "js_to_cpp.mojom", | |
50 ] | |
51 | |
52 # TODO(crbug.com/699569): Convert to use the new JS bindings. | |
53 use_new_js_bindings = false | |
54 } | |
55 | |
56 test("mojo_js_unittests") { | 22 test("mojo_js_unittests") { |
57 deps = [ | 23 deps = [ |
58 "//base", | 24 "//base", |
59 "//gin:gin_test", | 25 "//gin:gin_test", |
60 "//mojo/edk/js", | 26 "//mojo/edk/js", |
61 "//mojo/edk/test:run_all_unittests", | 27 "//mojo/edk/test:run_all_unittests", |
62 "//mojo/edk/test:test_support", | 28 "//mojo/edk/test:test_support", |
63 "//mojo/public/cpp/system", | 29 "//mojo/public/cpp/system", |
64 "//mojo/public/interfaces/bindings/tests:test_associated_interfaces", | 30 "//mojo/public/interfaces/bindings/tests:test_associated_interfaces", |
65 "//mojo/public/interfaces/bindings/tests:test_interfaces", | 31 "//mojo/public/interfaces/bindings/tests:test_interfaces", |
66 "//mojo/public/js:tests", | 32 "//mojo/public/js:tests", |
67 ] | 33 ] |
68 | 34 |
69 sources = [ | 35 sources = [ |
70 "//mojo/edk/js/handle_unittest.cc", | 36 "//mojo/edk/js/handle_unittest.cc", |
71 "run_js_unittests.cc", | 37 "run_js_unittests.cc", |
72 ] | 38 ] |
73 } | 39 } |
OLD | NEW |