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',
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/browser_tests_main.cc',
18 '../../../../test/base/extension_js_browser_test.cc',
19 '../../../../test/base/extension_js_browser_test.h',
20 '../../../../test/base/extension_load_waiter_one_shot.cc',
21 '../../../../test/base/extension_load_waiter_one_shot.h',
22 '../../../../test/base/javascript_browser_test.cc',
23 '../../../../test/base/javascript_browser_test.h',
24 '../../../../test/base/test_chrome_web_ui_controller_factory.cc',
25 '../../../../test/base/test_chrome_web_ui_controller_factory.h',
26 '../../../../test/base/web_ui_browser_test.cc',
27 '../../../../test/base/web_ui_browser_test.h',
29 'chromevox_tests_unitjs_sources': [
30 'braille/braille_display_manager_test.unitjs',
31 'braille/braille_input_handler_test.unitjs',
32 'braille/expanding_braille_translator_test.unitjs',
33 'braille/pan_strategy_test.unitjs',
34 'common/aria_util_test.unitjs',
35 'common/braille_text_handler_test.unitjs',
36 'common/braille_util_test.unitjs',
37 'common/command_store_test.unitjs',
38 'common/content_editable_extractor_test.unitjs',
39 'common/cursor_selection_test.unitjs',
40 'common/dom_util_test.unitjs',
41 'common/editable_text_area_shadow_test.unitjs',
42 'common/editable_text_test.unitjs',
43 'common/find_util_test.unitjs',
44 'common/key_sequence_test.unitjs',
45 'common/math_semantic_tree_test.unitjs',
46 'common/page_selection_test.unitjs',
47 'common/selection_util_test.unitjs',
48 'common/spannable_test.unitjs',
49 'common/string_util_test.unitjs',
50 'chromevox/injected/event_watcher_test.unitjs',
51 'chromevox/injected/live_regions_test.unitjs',
52 'chromevox/injected/user_commands_test.unitjs',
53 'chromevox/injected/navigation_manager_test.unitjs',
54 'host/chrome/braille_integration_test.unitjs',
55 'walkers/character_walker_test.unitjs',
56 'walkers/group_walker_test.unitjs',
57 'walkers/object_walker_test.unitjs',
58 'walkers/layout_line_walker_test.unitjs',
59 'walkers/math_shifter_test.unitjs',
60 'walkers/sentence_walker_test.unitjs',
61 'walkers/structural_line_walker_test.unitjs',
62 'walkers/table_walker_test.unitjs',
63 'walkers/word_walker_test.unitjs',
65 'chromevox_tests_extjs_sources': [
66 'braille/braille_table_test.extjs',
67 'braille/braille_translator_manager_test.extjs',
68 'braille/liblouis_test.extjs',
69 'cvox2/background/automation_util_test.extjs',
70 'cvox2/background/background_test.extjs',
71 'cvox2/background/cursors_test.extjs',
72 'cvox2/background/output_test.extjs',
73 'host/chrome/tts_background_test.extjs',
78 'target_name': 'chromevox_tests',
81 '<(DEPTH)/base/base.gyp:base',
82 '<(DEPTH)/base/base.gyp:base_i18n',
83 '<(DEPTH)/base/base.gyp:test_support_base',
84 '<(DEPTH)/chrome/chrome.gyp:browser',
85 '<(DEPTH)/chrome/chrome.gyp:renderer',
86 '<(DEPTH)/chrome/chrome.gyp:test_support_common',
87 '<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources',
88 '<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings',
89 '<(DEPTH)/chrome/chrome_resources.gyp:packed_extra_resources',
90 '<(DEPTH)/chrome/chrome_resources.gyp:packed_resources',
91 '<(DEPTH)/testing/gmock.gyp:gmock',
92 '<(DEPTH)/testing/gtest.gyp:gtest',
93 '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
94 'chromevox_test_deps_js',
97 [ 'cld_version==0 or cld_version==2', {
99 # Interactive tests should use whatever CLD2 data access mode that
100 # the application embedder is using.
101 '<(DEPTH)/third_party/cld_2/cld_2.gyp:cld2_platform_impl', ],
103 ['disable_nacl==0 and disable_nacl_untrusted==0', {
105 '<(DEPTH)/components/nacl.gyp:nacl_helper',
106 '<(DEPTH)/components/nacl_nonsfi.gyp:nacl_helper_nonsfi',
107 '<(DEPTH)/native_client/src/trusted/service_runtime/linux/nacl_bootstrap.gyp:nacl_helper_bootstrap',
112 'HAS_OUT_OF_PROC_TEST_RUNNER',
116 '<(SHARED_INTERMEDIATE_DIR)',
120 # A JavaScript test that runs in an environment similar to a webui
121 # browser test. This is meant for unit tests that test individual
122 # components without depending on the ChromeVox extension.
123 'rule_name': 'js2webui',
124 'extension': 'unitjs',
125 'msvs_external_rule': 1,
128 ['v8_use_external_startup_data==1', {
137 '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
141 '<(chromevox_test_deps_js_file)',
142 'testing/assert_additions.js',
143 'testing/chromevox_unittest_base.js',
146 '<(INTERMEDIATE_DIR)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)-gen.cc',
147 '<(PRODUCT_DIR)/test_data/chrome/browser/resources/chromeos/chromevox/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).js',
149 'process_outputs_as_sources': 1,
153 '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
154 '--deps_js', '<(chromevox_test_deps_js_file)',
155 '--external', '<(external_v8)',
160 '<(RULE_INPUT_PATH)',
161 'chrome/browser/resources/chromeos/chromevox/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).unitjs',
166 # A JavaScript test that runs in the ChromeVox background page's
168 'rule_name': 'js2extension',
169 'extension': 'extjs',
170 'msvs_external_rule': 1,
173 ['v8_use_external_startup_data==1', {
182 '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
186 'testing/callback_helper.js',
187 'testing/chromevox_e2e_test_base.js',
188 'testing/chromevox_next_e2e_test_base.js',
189 'testing/assert_additions.js',
192 '<(INTERMEDIATE_DIR)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)-gen.cc',
193 '<(PRODUCT_DIR)/test_data/chrome/browser/resources/chromeos/chromevox/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).extjs',
195 'process_outputs_as_sources': 1,
199 '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
200 '--external', '<(external_v8)',
205 '<(RULE_INPUT_PATH)',
206 'chrome/browser/resources/chromeos/chromevox/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).extjs',
212 '<@(chromevox_tests_sources)',
213 '<@(chromevox_tests_unitjs_sources)',
214 '<@(chromevox_tests_extjs_sources)',
216 }, # target chromevox_tests
218 'target_name': 'chromevox_test_messages_js',
222 'action_name': 'test_messages_js',
223 'message': 'Generate <(_target_name)',
225 'english_messages_file': '<(chromevox_dest_dir)/_locales/en/messages.json',
228 'tools/generate_test_messages.py',
229 '<(english_messages_file)',
232 '<(chromevox_test_messages_js_file)',
236 'tools/generate_test_messages.py',
237 '-o', '<(chromevox_test_messages_js_file)',
238 '<(english_messages_file)',
242 }, # target chromevox_test_messages_js
244 'target_name': 'chromevox_test_deps_js',
248 'action_name': 'deps_js',
249 'message': 'Generate <(_target_name)',
251 # Closure library directory relative to source tree root.
252 'closure_dir': 'chrome/third_party/chromevox/third_party/closure-library/closure/goog',
253 'depswriter_path': 'tools/generate_deps.py',
255 '<!@(python tools/find_js_files.py . <(DEPTH)/<(closure_dir))',
256 '<(chromevox_test_messages_js_file)',
261 '<(depswriter_path)',
264 '<(chromevox_test_deps_js_file)',
268 '<(depswriter_path)',
269 '-w', '<(DEPTH)/<(closure_dir):<(closure_dir)',
270 '-w', '<(PRODUCT_DIR)/test_data:',
271 '-w', ':chrome/browser/resources/chromeos/chromevox',
272 '-o', '<(chromevox_test_deps_js_file)',
278 'chromevox_test_messages_js',
280 }, # target chromevox_test_deps_js