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.
7 '../../../../js_unittest_vars.gypi',
10 'chromevox_test_deps_js_file': '<(SHARED_INTERMEDIATE_DIR)/chrome/browser/resources/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',
15 'target_name': 'chromevox_tests',
18 '<(DEPTH)/base/base.gyp:base',
19 '<(DEPTH)/base/base.gyp:base_i18n',
20 '<(DEPTH)/base/base.gyp:test_support_base',
21 '<(DEPTH)/chrome/chrome.gyp:browser',
22 '<(DEPTH)/chrome/chrome.gyp:renderer',
23 '<(DEPTH)/chrome/chrome.gyp:test_support_common',
24 '<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources',
25 '<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings',
26 '<(DEPTH)/chrome/chrome_resources.gyp:packed_extra_resources',
27 '<(DEPTH)/chrome/chrome_resources.gyp:packed_resources',
28 '<(DEPTH)/testing/gmock.gyp:gmock',
29 '<(DEPTH)/testing/gtest.gyp:gtest',
30 '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
31 'chromevox_test_deps_js',
34 [ 'cld_version==0 or cld_version==2', {
36 # Interactive tests should use whatever CLD2 data access mode that
37 # the application embedder is using.
38 '<(DEPTH)/third_party/cld_2/cld_2.gyp:cld2_platform_impl', ],
42 'HAS_OUT_OF_PROC_TEST_RUNNER',
46 '<(SHARED_INTERMEDIATE_DIR)',
50 # A JavaScript test that runs in an environment similar to a webui
51 # browser test. This is meant for unit tests that test individual
52 # components without depending on the ChromeVox extension.
53 'rule_name': 'js2webui',
54 'extension': 'unitjs',
55 'msvs_external_rule': 1,
58 ['v8_use_external_startup_data==1', {
67 '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
71 '<(chromevox_test_deps_js_file)',
72 'testing/assert_additions.js',
73 'testing/chromevox_unittest_base.js',
76 '<(INTERMEDIATE_DIR)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)-gen.cc',
77 '<(PRODUCT_DIR)/test_data/chrome/browser/resources/chromeos/chromevox/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).js',
79 'process_outputs_as_sources': 1,
83 '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
84 '--deps_js', '<(chromevox_test_deps_js_file)',
85 '--external', '<(external_v8)',
91 'chrome/browser/resources/chromeos/chromevox/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).unitjs',
96 # A JavaScript test that runs in the ChromeVox background page's
98 'rule_name': 'js2extension',
100 'msvs_external_rule': 1,
103 ['v8_use_external_startup_data==1', {
112 '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
116 'testing/callback_helper.js',
117 'testing/chromevox_e2e_test_base.js',
118 'testing/chromevox_next_e2e_test_base.js',
119 'testing/assert_additions.js',
122 '<(INTERMEDIATE_DIR)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)-gen.cc',
123 '<(PRODUCT_DIR)/test_data/chrome/browser/resources/chromeos/chromevox/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).extjs',
125 'process_outputs_as_sources': 1,
129 '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
130 '--external', '<(external_v8)',
135 '<(RULE_INPUT_PATH)',
136 'chrome/browser/resources/chromeos/chromevox/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).extjs',
142 '<(DEPTH)/chrome/browser/extensions/browsertest_util.cc',
143 '<(DEPTH)/chrome/browser/extensions/browsertest_util.h',
144 '<(DEPTH)/chrome/browser/ui/webui/web_ui_test_handler.cc',
145 '<(DEPTH)/chrome/browser/ui/webui/web_ui_test_handler.h',
146 '<(DEPTH)/chrome/test/base/browser_tests_main.cc',
147 '<(DEPTH)/chrome/test/base/extension_js_browser_test.cc',
148 '<(DEPTH)/chrome/test/base/extension_js_browser_test.h',
149 '<(DEPTH)/chrome/test/base/extension_load_waiter_one_shot.cc',
150 '<(DEPTH)/chrome/test/base/extension_load_waiter_one_shot.h',
151 '<(DEPTH)/chrome/test/base/javascript_browser_test.cc',
152 '<(DEPTH)/chrome/test/base/javascript_browser_test.h',
153 '<(DEPTH)/chrome/test/base/test_chrome_web_ui_controller_factory.cc',
154 '<(DEPTH)/chrome/test/base/test_chrome_web_ui_controller_factory.h',
155 '<(DEPTH)/chrome/test/base/web_ui_browser_test.cc',
156 '<(DEPTH)/chrome/test/base/web_ui_browser_test.h',
158 'braille/braille_display_manager_test.unitjs',
159 'braille/braille_input_handler_test.unitjs',
160 'braille/braille_table_test.extjs',
161 'braille/braille_translator_manager_test.extjs',
162 'braille/expanding_braille_translator_test.unitjs',
163 'braille/liblouis_test.extjs',
164 'braille/pan_strategy_test.unitjs',
165 'common/aria_util_test.unitjs',
166 'common/braille_text_handler_test.unitjs',
167 'common/braille_util_test.unitjs',
168 'common/command_store_test.unitjs',
169 'common/content_editable_extractor_test.unitjs',
170 'common/cursor_selection_test.unitjs',
171 'common/dom_util_test.unitjs',
172 'common/editable_text_area_shadow_test.unitjs',
173 'common/editable_text_test.unitjs',
174 'common/find_util_test.unitjs',
175 'common/key_sequence_test.unitjs',
176 'common/math_semantic_tree_test.unitjs',
177 'common/page_selection_test.unitjs',
178 'common/selection_util_test.unitjs',
179 'common/spannable_test.unitjs',
180 'common/string_util_test.unitjs',
181 'chromevox/injected/event_watcher_test.unitjs',
182 'chromevox/injected/live_regions_test.unitjs',
183 'chromevox/injected/user_commands_test.unitjs',
184 'chromevox/injected/navigation_manager_test.unitjs',
185 'cvox2/background/automation_util_test.extjs',
186 'cvox2/background/background_test.extjs',
187 'cvox2/background/cursors_test.extjs',
188 'cvox2/background/output_test.extjs',
189 'host/chrome/braille_integration_test.unitjs',
190 'host/chrome/tts_background_test.extjs',
191 'walkers/character_walker_test.unitjs',
192 'walkers/group_walker_test.unitjs',
193 'walkers/object_walker_test.unitjs',
194 'walkers/layout_line_walker_test.unitjs',
195 'walkers/math_shifter_test.unitjs',
196 'walkers/sentence_walker_test.unitjs',
197 'walkers/structural_line_walker_test.unitjs',
198 'walkers/table_walker_test.unitjs',
199 'walkers/word_walker_test.unitjs',
201 }, # target chromevox_tests
203 'target_name': 'chromevox_test_messages_js',
207 'action_name': 'test_messages_js',
208 'message': 'Generate <(_target_name)',
210 'english_messages_file': '<(chromevox_dest_dir)/_locales/en/messages.json',
213 'tools/generate_test_messages.py',
214 '<(english_messages_file)',
217 '<(chromevox_test_messages_js_file)',
221 'tools/generate_test_messages.py',
222 '-o', '<(chromevox_test_messages_js_file)',
223 '<(english_messages_file)',
227 }, # target chromevox_test_messages_js
229 'target_name': 'chromevox_test_deps_js',
233 'action_name': 'deps_js',
234 'message': 'Generate <(_target_name)',
236 # Closure library directory relative to source tree root.
237 'closure_dir': 'chrome/third_party/chromevox/third_party/closure-library/closure/goog',
238 'depswriter_path': 'tools/generate_deps.py',
240 '<!@(python tools/find_js_files.py . <(DEPTH)/<(closure_dir))',
241 '<(chromevox_test_messages_js_file)',
246 '<(depswriter_path)',
249 '<(chromevox_test_deps_js_file)',
253 '<(depswriter_path)',
254 '-w', '<(DEPTH)/<(closure_dir):<(closure_dir)',
255 '-w', '<(PRODUCT_DIR)/test_data:',
256 '-w', ':chrome/browser/resources/chromeos/chromevox',
257 '-o', '<(chromevox_test_deps_js_file)',
263 'chromevox_test_messages_js',
265 }, # target chromevox_test_deps_js