OLD | NEW |
1 # Copyright 2017 The Chromium Authors. All rights reserved. | 1 # Copyright 2017 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("//build/config/features.gni") | 5 import("//build/config/features.gni") |
6 import("//testing/test.gni") | 6 import("//testing/test.gni") |
7 import("//chrome/test/base/js2gtest.gni") | 7 import("//chrome/test/base/js2gtest.gni") |
8 import("//chrome/browser/resources/chromeos/chromevox/run_jsbundler.gni") | 8 import("//chrome/browser/resources/chromeos/chromevox/run_jsbundler.gni") |
9 | 9 |
10 assert(is_chromeos) | 10 assert(is_chromeos) |
11 | 11 |
12 switch_access_dir = "$root_out_dir/resources/chromeos/switch_access" | 12 switch_access_dir = "$root_out_dir/resources/chromeos/switch_access" |
13 | 13 |
14 group("switch_access") { | 14 group("switch_access") { |
15 deps = [ | 15 deps = [ |
16 ":switch_access_copied_files", | 16 ":switch_access_copied_files", |
17 ":switch_access_guest_manifest", | 17 ":switch_access_guest_manifest", |
18 ":switch_access_manifest", | 18 ":switch_access_manifest", |
19 ] | 19 ] |
20 } | 20 } |
21 | 21 |
22 # Instead of setting up one copy target for each subdirectory, use a script | 22 # Instead of setting up one copy target for each subdirectory, use a script |
23 # to copy all files. | 23 # to copy all files. |
24 run_jsbundler("switch_access_copied_files") { | 24 run_jsbundler("switch_access_copied_files") { |
25 mode = "copy" | 25 mode = "copy" |
26 dest_dir = switch_access_dir | 26 dest_dir = switch_access_dir |
27 sources = [ | 27 sources = [ |
28 "auto_scan_manager.js", | 28 "auto_scan_manager.js", |
29 "automation_manager.js", | 29 "automation_manager.js", |
| 30 "automation_predicate.js", |
30 "background.js", | 31 "background.js", |
31 "keyboard_handler.js", | 32 "keyboard_handler.js", |
32 "options.css", | 33 "options.css", |
33 "options.html", | 34 "options.html", |
34 "options.js", | 35 "options.js", |
35 "prefs.js", | 36 "prefs.js", |
36 "switch_access.js", | 37 "switch_access.js", |
37 "tree_walker.js", | 38 "tree_walker.js", |
38 ] | 39 ] |
39 rewrite_rules = [ | 40 rewrite_rules = [ |
40 rebase_path(".", root_build_dir) + ":", | 41 rebase_path(".", root_build_dir) + ":", |
41 rebase_path(closure_library_dir, root_build_dir) + ":closure", | 42 rebase_path(closure_library_dir, root_build_dir) + ":closure", |
42 ] | 43 ] |
43 } | 44 } |
44 | 45 |
45 test("switch_access_tests") { | 46 test("switch_access_tests") { |
46 deps = [ | 47 deps = [ |
47 ":switch_access_webuijs_tests", | 48 ":switch_access_webuijs_tests", |
48 "//chrome/test:browser_tests_runner", | 49 "//chrome/test:browser_tests_runner", |
49 ] | 50 ] |
50 } | 51 } |
51 | 52 |
52 js2gtest("switch_access_webuijs_tests") { | 53 js2gtest("switch_access_webuijs_tests") { |
53 test_type = "webui" | 54 test_type = "webui" |
54 sources = [ | 55 sources = [ |
55 "auto_scan_manager_unittest.gtestjs", | 56 "auto_scan_manager_unittest.gtestjs", |
| 57 "automation_predicate_unittest.gtestjs", |
56 "tree_walker_unittest.gtestjs", | 58 "tree_walker_unittest.gtestjs", |
57 ] | 59 ] |
58 extra_js_files = [ | 60 extra_js_files = [ |
59 "auto_scan_manager.js", | 61 "auto_scan_manager.js", |
| 62 "automation_predicate.js", |
60 "tree_walker.js", | 63 "tree_walker.js", |
61 ] | 64 ] |
62 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] | 65 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] |
63 } | 66 } |
64 | 67 |
65 # TODO: refactor this into another file like generate_manifest.gni | 68 # TODO: refactor this into another file like generate_manifest.gni |
66 # to share with other extensions. | 69 # to share with other extensions. |
67 template("manifest") { | 70 template("manifest") { |
68 version_file = "//chrome/VERSION" | 71 version_file = "//chrome/VERSION" |
69 version_script = "//build/util/version.py" | 72 version_script = "//build/util/version.py" |
(...skipping 25 matching lines...) Expand all Loading... |
95 } | 98 } |
96 | 99 |
97 manifest("switch_access_manifest") { | 100 manifest("switch_access_manifest") { |
98 output_file = "$switch_access_dir/manifest.json" | 101 output_file = "$switch_access_dir/manifest.json" |
99 } | 102 } |
100 | 103 |
101 manifest("switch_access_guest_manifest") { | 104 manifest("switch_access_guest_manifest") { |
102 output_file = "$switch_access_dir/manifest_guest.json" | 105 output_file = "$switch_access_dir/manifest_guest.json" |
103 is_guest_manifest = true | 106 is_guest_manifest = true |
104 } | 107 } |
OLD | NEW |