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/chromevox_e2e_test_base.js',
117 'testing/assert_additions.js',
120 '<(INTERMEDIATE_DIR)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)-gen.cc',
121 '<(PRODUCT_DIR)/test_data/chrome/browser/resources/chromeos/chromevox/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).extjs',
123 'process_outputs_as_sources': 1,
127 '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
128 '--external', '<(external_v8)',
133 '<(RULE_INPUT_PATH)',
134 'chrome/browser/resources/chromeos/chromevox/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).extjs',
140 '<(DEPTH)/chrome/browser/ui/webui/web_ui_test_handler.cc',
141 '<(DEPTH)/chrome/browser/ui/webui/web_ui_test_handler.h',
142 '<(DEPTH)/chrome/test/base/browser_tests_main.cc',
143 '<(DEPTH)/chrome/test/base/extension_load_waiter_one_shot.cc',
144 '<(DEPTH)/chrome/test/base/extension_load_waiter_one_shot.h',
145 '<(DEPTH)/chrome/test/base/extension_js_browser_test.cc',
146 '<(DEPTH)/chrome/test/base/extension_js_browser_test.h',
147 '<(DEPTH)/chrome/test/base/javascript_browser_test.cc',
148 '<(DEPTH)/chrome/test/base/javascript_browser_test.h',
149 '<(DEPTH)/chrome/test/base/test_chrome_web_ui_controller_factory.cc',
150 '<(DEPTH)/chrome/test/base/test_chrome_web_ui_controller_factory.h',
151 '<(DEPTH)/chrome/test/base/web_ui_browser_test.cc',
152 '<(DEPTH)/chrome/test/base/web_ui_browser_test.h',
153 '<(DEPTH)/chrome/browser/extensions/browsertest_util.cc',
154 '<(DEPTH)/chrome/browser/extensions/browsertest_util.h',
156 'common/aria_util_test.unitjs',
157 'common/braille_text_handler_test.unitjs',
158 'common/braille_util_test.unitjs',
159 'common/command_store_test.unitjs',
160 'common/content_editable_extractor_test.unitjs',
161 'common/cursor_selection_test.unitjs',
162 'common/dom_util_test.unitjs',
163 'common/editable_text_area_shadow_test.unitjs',
164 'common/editable_text_test.unitjs',
165 'common/find_util_test.unitjs',
166 'common/key_sequence_test.unitjs',
167 'common/math_semantic_tree_test.unitjs',
168 'common/page_selection_test.unitjs',
169 'common/selection_util_test.unitjs',
170 'common/spannable_test.unitjs',
171 'chromevox/injected/event_watcher_test.unitjs',
172 'chromevox/injected/live_regions_test.unitjs',
173 'chromevox/injected/user_commands_test.unitjs',
174 'chromevox/injected/navigation_manager_test.unitjs',
175 'cvox2/background/automation_util_test.extjs',
176 'cvox2/background/background_test.extjs',
177 'cvox2/background/cursors_test.extjs',
178 'cvox2/background/output_test.extjs',
179 'host/chrome/braille_display_manager_test.unitjs',
180 'host/chrome/braille_input_handler_test.unitjs',
181 'host/chrome/braille_integration_test.unitjs',
182 'host/chrome/braille_table_test.extjs',
183 'host/chrome/expanding_braille_translator_test.unitjs',
184 'host/chrome/tts_background_test.extjs',
185 'liblouis_nacl/liblouis_test.extjs',
186 'walkers/character_walker_test.unitjs',
187 'walkers/group_walker_test.unitjs',
188 'walkers/object_walker_test.unitjs',
189 'walkers/layout_line_walker_test.unitjs',
190 'walkers/math_shifter_test.unitjs',
191 'walkers/sentence_walker_test.unitjs',
192 'walkers/structural_line_walker_test.unitjs',
193 'walkers/table_walker_test.unitjs',
194 'walkers/word_walker_test.unitjs',
196 }, # target chromevox_tests
198 'target_name': 'chromevox_test_messages_js',
202 'action_name': 'test_messages_js',
203 'message': 'Generate <(_target_name)',
205 'english_messages_file': '<(chromevox_dest_dir)/_locales/en/messages.json',
208 'tools/generate_test_messages.py',
209 '<(english_messages_file)',
212 '<(chromevox_test_messages_js_file)',
216 'tools/generate_test_messages.py',
217 '-o', '<(chromevox_test_messages_js_file)',
218 '<(english_messages_file)',
222 }, # target chromevox_test_messages_js
224 'target_name': 'chromevox_test_deps_js',
228 'action_name': 'deps_js',
229 'message': 'Generate <(_target_name)',
231 # Closure library directory relative to source tree root.
232 'closure_dir': 'chrome/third_party/chromevox/third_party/closure-library/closure/goog',
233 'depswriter_path': 'tools/generate_deps.py',
235 '<!@(python tools/find_js_files.py . <(DEPTH)/<(closure_dir))',
236 '<(chromevox_test_messages_js_file)',
241 '<(depswriter_path)',
244 '<(chromevox_test_deps_js_file)',
248 '<(depswriter_path)',
249 '-w', '<(DEPTH)/<(closure_dir):<(closure_dir)',
250 '-w', '<(PRODUCT_DIR)/test_data:',
251 '-w', ':chrome/browser/resources/chromeos/chromevox',
252 '-o', '<(chromevox_test_deps_js_file)',
258 'chromevox_test_messages_js',
260 }, # target chromevox_test_deps_js