OLD | NEW |
| (Empty) |
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 | |
3 # found in the LICENSE file. | |
4 | |
5 { | |
6 'includes': [ | |
7 '../../../../js_unittest_vars.gypi', | |
8 ], | |
9 'variables': { | |
10 'chromevox_test_deps_js_file': '<(SHARED_INTERMEDIATE_DIR)/chrome/browser/re
sources/chromeos/chromevox/test_deps.js', | |
11 'chromevox_test_messages_js_file': '<(PRODUCT_DIR)/test_data/chrome/browser/
resources/chromeos/chromevox/host/testing/test_messages.js', | |
12 'chromevox_tests_sources': [ | |
13 '../../../../browser/extensions/browsertest_util.cc', | |
14 '../../../../browser/extensions/browsertest_util.h', | |
15 '../../../../browser/ui/webui/web_ui_test_handler.cc', | |
16 '../../../../browser/ui/webui/web_ui_test_handler.h', | |
17 '../../../../test/base/extension_js_browser_test.cc', | |
18 '../../../../test/base/extension_js_browser_test.h', | |
19 '../../../../test/base/extension_load_waiter_one_shot.cc', | |
20 '../../../../test/base/extension_load_waiter_one_shot.h', | |
21 '../../../../test/base/javascript_browser_test.cc', | |
22 '../../../../test/base/javascript_browser_test.h', | |
23 '../../../../test/base/test_chrome_web_ui_controller_factory.cc', | |
24 '../../../../test/base/test_chrome_web_ui_controller_factory.h', | |
25 '../../../../test/base/web_ui_browser_test.cc', | |
26 '../../../../test/base/web_ui_browser_test.h', | |
27 ], | |
28 'chromevox_tests_unit_gen_include_sources': [ | |
29 'testing/assert_additions.js', | |
30 'testing/callback_helper.js', | |
31 'testing/chromevox_unittest_base.js', | |
32 'testing/mock_feedback.js', | |
33 ], | |
34 'chromevox_tests_unitjs_sources': [ | |
35 'braille/braille_display_manager_test.unitjs', | |
36 'braille/braille_input_handler_test.unitjs', | |
37 'braille/expanding_braille_translator_test.unitjs', | |
38 'braille/pan_strategy_test.unitjs', | |
39 'common/aria_util_test.unitjs', | |
40 'common/braille_text_handler_test.unitjs', | |
41 'common/braille_util_test.unitjs', | |
42 'common/command_store_test.unitjs', | |
43 'common/content_editable_extractor_test.unitjs', | |
44 'common/cursor_selection_test.unitjs', | |
45 'common/dom_util_test.unitjs', | |
46 'common/editable_text_area_shadow_test.unitjs', | |
47 'common/editable_text_test.unitjs', | |
48 'common/find_util_test.unitjs', | |
49 'common/key_sequence_test.unitjs', | |
50 'common/math_semantic_tree_test.unitjs', | |
51 'common/page_selection_test.unitjs', | |
52 'common/selection_util_test.unitjs', | |
53 'common/spannable_test.unitjs', | |
54 'common/string_util_test.unitjs', | |
55 'chromevox/injected/event_watcher_test.unitjs', | |
56 'chromevox/injected/live_regions_test.unitjs', | |
57 'chromevox/injected/user_commands_test.unitjs', | |
58 'chromevox/injected/navigation_manager_test.unitjs', | |
59 'host/chrome/braille_integration_test.unitjs', | |
60 'testing/mock_feedback_test.unitjs', | |
61 'walkers/character_walker_test.unitjs', | |
62 'walkers/group_walker_test.unitjs', | |
63 'walkers/object_walker_test.unitjs', | |
64 'walkers/layout_line_walker_test.unitjs', | |
65 'walkers/math_shifter_test.unitjs', | |
66 'walkers/sentence_walker_test.unitjs', | |
67 'walkers/structural_line_walker_test.unitjs', | |
68 'walkers/table_walker_test.unitjs', | |
69 'walkers/word_walker_test.unitjs', | |
70 ], | |
71 'chromevox_tests_ext_gen_include_sources': [ | |
72 'testing/assert_additions.js', | |
73 'testing/callback_helper.js', | |
74 'testing/chromevox_e2e_test_base.js', | |
75 'testing/chromevox_next_e2e_test_base.js', | |
76 'testing/mock_feedback.js', | |
77 ], | |
78 'chromevox_tests_extjs_sources': [ | |
79 'braille/braille_table_test.extjs', | |
80 'braille/braille_translator_manager_test.extjs', | |
81 'braille/liblouis_test.extjs', | |
82 'cvox2/background/automation_util_test.extjs', | |
83 'cvox2/background/background_test.extjs', | |
84 'cvox2/background/cursors_test.extjs', | |
85 'cvox2/background/editing_test.extjs', | |
86 'cvox2/background/i_search_test.extjs', | |
87 'cvox2/background/live_regions_test.extjs', | |
88 'cvox2/background/output_test.extjs', | |
89 'cvox2/background/tree_walker_test.extjs', | |
90 'host/chrome/tts_background_test.extjs', | |
91 ], | |
92 }, | |
93 'targets': [ | |
94 { | |
95 'target_name': 'chromevox_tests', | |
96 'type': 'executable', | |
97 'dependencies': [ | |
98 '<(DEPTH)/base/base.gyp:base', | |
99 '<(DEPTH)/base/base.gyp:base_i18n', | |
100 '<(DEPTH)/base/base.gyp:test_support_base', | |
101 '<(DEPTH)/chrome/chrome.gyp:browser', | |
102 '<(DEPTH)/chrome/chrome.gyp:renderer', | |
103 '<(DEPTH)/chrome/chrome.gyp:test_support_common', | |
104 '<(DEPTH)/chrome/chrome.gyp:test_support_ui', | |
105 '<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources', | |
106 '<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings', | |
107 '<(DEPTH)/chrome/chrome_resources.gyp:packed_extra_resources', | |
108 '<(DEPTH)/chrome/chrome_resources.gyp:packed_resources', | |
109 '<(DEPTH)/content/content_shell_and_tests.gyp:content_browser_test_base'
, | |
110 '<(DEPTH)/testing/gmock.gyp:gmock', | |
111 '<(DEPTH)/testing/gtest.gyp:gtest', | |
112 '<(DEPTH)/v8/src/v8.gyp:v8', | |
113 'chromevox_test_deps_js', | |
114 ], | |
115 'conditions': [ | |
116 ['disable_nacl==0 and disable_nacl_untrusted==0', { | |
117 'dependencies': [ | |
118 '<(DEPTH)/components/nacl.gyp:nacl_helper', | |
119 '<(DEPTH)/components/nacl_nonsfi.gyp:nacl_helper_nonsfi', | |
120 '<(DEPTH)/native_client/src/trusted/service_runtime/linux/nacl_boots
trap.gyp:nacl_helper_bootstrap', | |
121 ], | |
122 }], | |
123 ], | |
124 'defines': [ | |
125 'HAS_OUT_OF_PROC_TEST_RUNNER', | |
126 ], | |
127 'include_dirs': [ | |
128 '<(DEPTH)', | |
129 '<(SHARED_INTERMEDIATE_DIR)', | |
130 ], | |
131 'rules': [ | |
132 { | |
133 # A JavaScript test that runs in an environment similar to a webui | |
134 # browser test. This is meant for unit tests that test individual | |
135 # components without depending on the ChromeVox extension. | |
136 'rule_name': 'js2webui', | |
137 'extension': 'unitjs', | |
138 'msvs_external_rule': 1, | |
139 'variables': { | |
140 'conditions': [ | |
141 ['v8_use_external_startup_data==1', { | |
142 'external_v8': 'y', | |
143 }, { | |
144 'external_v8': 'n', | |
145 }], | |
146 ], | |
147 }, | |
148 'inputs': [ | |
149 '<(gypv8sh)', | |
150 '<(PRODUCT_DIR)/v8_shell<(EXECUTABLE_SUFFIX)', | |
151 '<(mock_js)', | |
152 '<(test_api_js)', | |
153 '<(js2gtest)', | |
154 '<(chromevox_test_deps_js_file)', | |
155 '<@(chromevox_tests_unit_gen_include_sources)', | |
156 ], | |
157 'outputs': [ | |
158 '<(INTERMEDIATE_DIR)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)-gen.cc
', | |
159 '<(PRODUCT_DIR)/test_data/chrome/browser/resources/chromeos/chromevo
x/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).js', | |
160 ], | |
161 'process_outputs_as_sources': 1, | |
162 'action': [ | |
163 'python', | |
164 '<(gypv8sh)', | |
165 '<(PRODUCT_DIR)/v8_shell<(EXECUTABLE_SUFFIX)', | |
166 '--deps_js', '<(chromevox_test_deps_js_file)', | |
167 '--external', '<(external_v8)', | |
168 '<(mock_js)', | |
169 '<(test_api_js)', | |
170 '<(js2gtest)', | |
171 'webui', | |
172 '<(RULE_INPUT_PATH)', | |
173 'chrome/browser/resources/chromeos/chromevox/<(RULE_INPUT_DIRNAME)/<
(RULE_INPUT_ROOT).unitjs', | |
174 '<@(_outputs)', | |
175 ], | |
176 }, | |
177 { | |
178 # A JavaScript test that runs in the ChromeVox background page's | |
179 # isolate. | |
180 'rule_name': 'js2extension', | |
181 'extension': 'extjs', | |
182 'msvs_external_rule': 1, | |
183 'variables': { | |
184 'conditions': [ | |
185 ['v8_use_external_startup_data==1', { | |
186 'external_v8': 'y', | |
187 }, { | |
188 'external_v8': 'n', | |
189 }], | |
190 ], | |
191 }, | |
192 'inputs': [ | |
193 '<(gypv8sh)', | |
194 '<(PRODUCT_DIR)/v8_shell<(EXECUTABLE_SUFFIX)', | |
195 '<(mock_js)', | |
196 '<(test_api_js)', | |
197 '<(js2gtest)', | |
198 '<@(chromevox_tests_ext_gen_include_sources)', | |
199 ], | |
200 'outputs': [ | |
201 '<(INTERMEDIATE_DIR)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)-gen.cc
', | |
202 '<(PRODUCT_DIR)/test_data/chrome/browser/resources/chromeos/chromevo
x/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).extjs', | |
203 ], | |
204 'process_outputs_as_sources': 1, | |
205 'action': [ | |
206 'python', | |
207 '<(gypv8sh)', | |
208 '<(PRODUCT_DIR)/v8_shell<(EXECUTABLE_SUFFIX)', | |
209 '--external', '<(external_v8)', | |
210 '<(mock_js)', | |
211 '<(test_api_js)', | |
212 '<(js2gtest)', | |
213 'extension', | |
214 '<(RULE_INPUT_PATH)', | |
215 'chrome/browser/resources/chromeos/chromevox/<(RULE_INPUT_DIRNAME)/<
(RULE_INPUT_ROOT).extjs', | |
216 '<@(_outputs)', | |
217 ], | |
218 }, | |
219 ], | |
220 'sources': [ | |
221 '<@(chromevox_tests_sources)', | |
222 '<@(chromevox_tests_unitjs_sources)', | |
223 '<@(chromevox_tests_extjs_sources)', | |
224 ], | |
225 }, # target chromevox_tests | |
226 { | |
227 'target_name': 'chromevox_test_messages_js', | |
228 'type': 'none', | |
229 'actions': [ | |
230 { | |
231 'action_name': 'test_messages_js', | |
232 'message': 'Generate <(_target_name)', | |
233 'variables': { | |
234 'english_messages_file': '<(chromevox_dest_dir)/_locales/en/messages
.json', | |
235 }, | |
236 'inputs': [ | |
237 'tools/generate_test_messages.py', | |
238 '<(english_messages_file)', | |
239 ], | |
240 'outputs': [ | |
241 '<(chromevox_test_messages_js_file)', | |
242 ], | |
243 'action': [ | |
244 'python', | |
245 'tools/generate_test_messages.py', | |
246 '-o', '<(chromevox_test_messages_js_file)', | |
247 '<(english_messages_file)', | |
248 ], | |
249 }, | |
250 ], | |
251 }, # target chromevox_test_messages_js | |
252 { | |
253 'target_name': 'chromevox_test_deps_js', | |
254 'type': 'none', | |
255 'actions': [ | |
256 { | |
257 'action_name': 'deps_js', | |
258 'message': 'Generate <(_target_name)', | |
259 'variables': { | |
260 # Closure library directory relative to source tree root. | |
261 'closure_dir': 'chrome/third_party/chromevox/third_party/closure-lib
rary/closure/goog', | |
262 'depswriter_path': 'tools/generate_deps.py', | |
263 'js_files': [ | |
264 '<!@(python tools/find_js_files.py . <(DEPTH)/<(closure_dir))', | |
265 '<(chromevox_test_messages_js_file)', | |
266 ], | |
267 }, | |
268 'inputs': [ | |
269 '<@(js_files)', | |
270 '<(depswriter_path)', | |
271 ], | |
272 'outputs': [ | |
273 '<(chromevox_test_deps_js_file)', | |
274 ], | |
275 'action': [ | |
276 'python', | |
277 '<(depswriter_path)', | |
278 '-w', '<(DEPTH)/<(closure_dir):<(closure_dir)', | |
279 '-w', '<(PRODUCT_DIR)/test_data:', | |
280 '-w', ':chrome/browser/resources/chromeos/chromevox', | |
281 '-o', '<(chromevox_test_deps_js_file)', | |
282 '<@(js_files)', | |
283 ], | |
284 }, | |
285 ], | |
286 'dependencies': [ | |
287 'chromevox_test_messages_js', | |
288 ], | |
289 }, # target chromevox_test_deps_js | |
290 ], | |
291 } | |
OLD | NEW |