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_unit_gen_include_sources': [
30 'testing/assert_additions.js',
31 'testing/callback_helper.js',
32 'testing/chromevox_unittest_base.js',
33 'testing/mock_feedback.js',
35 'chromevox_tests_unitjs_sources': [
36 'braille/braille_display_manager_test.unitjs',
37 'braille/braille_input_handler_test.unitjs',
38 'braille/expanding_braille_translator_test.unitjs',
39 'braille/pan_strategy_test.unitjs',
40 'common/aria_util_test.unitjs',
41 'common/braille_text_handler_test.unitjs',
42 'common/braille_util_test.unitjs',
43 'common/command_store_test.unitjs',
44 'common/content_editable_extractor_test.unitjs',
45 'common/cursor_selection_test.unitjs',
46 'common/dom_util_test.unitjs',
47 'common/editable_text_area_shadow_test.unitjs',
48 'common/editable_text_test.unitjs',
49 'common/find_util_test.unitjs',
50 'common/key_sequence_test.unitjs',
51 'common/math_semantic_tree_test.unitjs',
52 'common/page_selection_test.unitjs',
53 'common/selection_util_test.unitjs',
54 'common/spannable_test.unitjs',
55 'common/string_util_test.unitjs',
56 'chromevox/injected/event_watcher_test.unitjs',
57 'chromevox/injected/live_regions_test.unitjs',
58 'chromevox/injected/user_commands_test.unitjs',
59 'chromevox/injected/navigation_manager_test.unitjs',
60 'host/chrome/braille_integration_test.unitjs',
61 'testing/mock_feedback_test.unitjs',
62 'walkers/character_walker_test.unitjs',
63 'walkers/group_walker_test.unitjs',
64 'walkers/object_walker_test.unitjs',
65 'walkers/layout_line_walker_test.unitjs',
66 'walkers/math_shifter_test.unitjs',
67 'walkers/sentence_walker_test.unitjs',
68 'walkers/structural_line_walker_test.unitjs',
69 'walkers/table_walker_test.unitjs',
70 'walkers/word_walker_test.unitjs',
72 'chromevox_tests_ext_gen_include_sources': [
73 'testing/assert_additions.js',
74 'testing/callback_helper.js',
75 'testing/chromevox_e2e_test_base.js',
76 'testing/chromevox_next_e2e_test_base.js',
77 'testing/mock_feedback.js',
79 'chromevox_tests_extjs_sources': [
80 'braille/braille_table_test.extjs',
81 'braille/braille_translator_manager_test.extjs',
82 'braille/liblouis_test.extjs',
83 'cvox2/background/automation_util_test.extjs',
84 'cvox2/background/background_test.extjs',
85 'cvox2/background/cursors_test.extjs',
86 'cvox2/background/output_test.extjs',
87 'host/chrome/tts_background_test.extjs',
92 'target_name': 'chromevox_tests',
95 '<(DEPTH)/base/base.gyp:base',
96 '<(DEPTH)/base/base.gyp:base_i18n',
97 '<(DEPTH)/base/base.gyp:test_support_base',
98 '<(DEPTH)/chrome/chrome.gyp:browser',
99 '<(DEPTH)/chrome/chrome.gyp:renderer',
100 '<(DEPTH)/chrome/chrome.gyp:test_support_common',
101 '<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources',
102 '<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings',
103 '<(DEPTH)/chrome/chrome_resources.gyp:packed_extra_resources',
104 '<(DEPTH)/chrome/chrome_resources.gyp:packed_resources',
105 '<(DEPTH)/testing/gmock.gyp:gmock',
106 '<(DEPTH)/testing/gtest.gyp:gtest',
107 '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
108 'chromevox_test_deps_js',
111 [ 'cld_version==0 or cld_version==2', {
113 # Interactive tests should use whatever CLD2 data access mode that
114 # the application embedder is using.
115 '<(DEPTH)/third_party/cld_2/cld_2.gyp:cld2_platform_impl', ],
117 ['disable_nacl==0 and disable_nacl_untrusted==0', {
119 '<(DEPTH)/components/nacl.gyp:nacl_helper',
120 '<(DEPTH)/components/nacl_nonsfi.gyp:nacl_helper_nonsfi',
121 '<(DEPTH)/native_client/src/trusted/service_runtime/linux/nacl_bootstrap.gyp:nacl_helper_bootstrap',
126 'HAS_OUT_OF_PROC_TEST_RUNNER',
130 '<(SHARED_INTERMEDIATE_DIR)',
134 # A JavaScript test that runs in an environment similar to a webui
135 # browser test. This is meant for unit tests that test individual
136 # components without depending on the ChromeVox extension.
137 'rule_name': 'js2webui',
138 'extension': 'unitjs',
139 'msvs_external_rule': 1,
142 ['v8_use_external_startup_data==1', {
151 '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
155 '<(chromevox_test_deps_js_file)',
156 '<@(chromevox_tests_unit_gen_include_sources)',
159 '<(INTERMEDIATE_DIR)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)-gen.cc',
160 '<(PRODUCT_DIR)/test_data/chrome/browser/resources/chromeos/chromevox/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).js',
162 'process_outputs_as_sources': 1,
166 '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
167 '--deps_js', '<(chromevox_test_deps_js_file)',
168 '--external', '<(external_v8)',
173 '<(RULE_INPUT_PATH)',
174 'chrome/browser/resources/chromeos/chromevox/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).unitjs',
179 # A JavaScript test that runs in the ChromeVox background page's
181 'rule_name': 'js2extension',
182 'extension': 'extjs',
183 'msvs_external_rule': 1,
186 ['v8_use_external_startup_data==1', {
195 '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
199 '<@(chromevox_tests_ext_gen_include_sources)',
202 '<(INTERMEDIATE_DIR)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)-gen.cc',
203 '<(PRODUCT_DIR)/test_data/chrome/browser/resources/chromeos/chromevox/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).extjs',
205 'process_outputs_as_sources': 1,
209 '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
210 '--external', '<(external_v8)',
215 '<(RULE_INPUT_PATH)',
216 'chrome/browser/resources/chromeos/chromevox/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).extjs',
222 '<@(chromevox_tests_sources)',
223 '<@(chromevox_tests_unitjs_sources)',
224 '<@(chromevox_tests_extjs_sources)',
226 }, # target chromevox_tests
228 'target_name': 'chromevox_test_messages_js',
232 'action_name': 'test_messages_js',
233 'message': 'Generate <(_target_name)',
235 'english_messages_file': '<(chromevox_dest_dir)/_locales/en/messages.json',
238 'tools/generate_test_messages.py',
239 '<(english_messages_file)',
242 '<(chromevox_test_messages_js_file)',
246 'tools/generate_test_messages.py',
247 '-o', '<(chromevox_test_messages_js_file)',
248 '<(english_messages_file)',
252 }, # target chromevox_test_messages_js
254 'target_name': 'chromevox_test_deps_js',
258 'action_name': 'deps_js',
259 'message': 'Generate <(_target_name)',
261 # Closure library directory relative to source tree root.
262 'closure_dir': 'chrome/third_party/chromevox/third_party/closure-library/closure/goog',
263 'depswriter_path': 'tools/generate_deps.py',
265 '<!@(python tools/find_js_files.py . <(DEPTH)/<(closure_dir))',
266 '<(chromevox_test_messages_js_file)',
271 '<(depswriter_path)',
274 '<(chromevox_test_deps_js_file)',
278 '<(depswriter_path)',
279 '-w', '<(DEPTH)/<(closure_dir):<(closure_dir)',
280 '-w', '<(PRODUCT_DIR)/test_data:',
281 '-w', ':chrome/browser/resources/chromeos/chromevox',
282 '-o', '<(chromevox_test_deps_js_file)',
288 'chromevox_test_messages_js',
290 }, # target chromevox_test_deps_js