[sql] Remove _HAS_EXCEPTIONS=0 from build info.
[chromium-blink-merge.git] / chrome / browser / resources / chromeos / chromevox / chromevox_tests.gypi
blob44be1c2a733c08b82d40470b13f61bed28f511e4
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.
6   'includes': [
7     '../../../../js_unittest_vars.gypi',
8   ],
9   'variables': {
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',
28     ],
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',
64     ],
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',
74     ],
75   },
76   'targets': [
77     {
78       'target_name': 'chromevox_tests',
79       'type': 'executable',
80       'dependencies': [
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',
95       ],
96       'conditions': [
97         [ 'cld_version==0 or cld_version==2', {
98           'dependencies': [
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', ],
102         }],
103         ['disable_nacl==0 and disable_nacl_untrusted==0', {
104           'dependencies': [
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',
108           ],
109         }],
110       ],
111       'defines': [
112         'HAS_OUT_OF_PROC_TEST_RUNNER',
113       ],
114       'include_dirs': [
115         '<(DEPTH)',
116         '<(SHARED_INTERMEDIATE_DIR)',
117       ],
118       'rules': [
119         {
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,
126           'variables': {
127             'conditions': [
128               ['v8_use_external_startup_data==1', {
129                 'external_v8': 'y',
130               }, {
131                 'external_v8': 'n',
132               }],
133             ],
134           },
135           'inputs': [
136             '<(gypv8sh)',
137             '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
138             '<(mock_js)',
139             '<(test_api_js)',
140             '<(js2gtest)',
141             '<(chromevox_test_deps_js_file)',
142             'testing/assert_additions.js',
143             'testing/chromevox_unittest_base.js',
144           ],
145           'outputs': [
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',
148           ],
149           'process_outputs_as_sources': 1,
150           'action': [
151             'python',
152             '<(gypv8sh)',
153             '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
154             '--deps_js', '<(chromevox_test_deps_js_file)',
155             '--external', '<(external_v8)',
156             '<(mock_js)',
157             '<(test_api_js)',
158             '<(js2gtest)',
159             'webui',
160             '<(RULE_INPUT_PATH)',
161             'chrome/browser/resources/chromeos/chromevox/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).unitjs',
162             '<@(_outputs)',
163           ],
164         },
165         {
166           # A JavaScript test that runs in the ChromeVox background page's
167           # isolate.
168           'rule_name': 'js2extension',
169           'extension': 'extjs',
170           'msvs_external_rule': 1,
171           'variables': {
172             'conditions': [
173               ['v8_use_external_startup_data==1', {
174                 'external_v8': 'y',
175               }, {
176                 'external_v8': 'n',
177               }],
178             ],
179           },
180           'inputs': [
181             '<(gypv8sh)',
182             '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
183             '<(mock_js)',
184             '<(test_api_js)',
185             '<(js2gtest)',
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',
190           ],
191           'outputs': [
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',
194           ],
195           'process_outputs_as_sources': 1,
196           'action': [
197             'python',
198             '<(gypv8sh)',
199             '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
200             '--external', '<(external_v8)',
201             '<(mock_js)',
202             '<(test_api_js)',
203             '<(js2gtest)',
204             'extension',
205             '<(RULE_INPUT_PATH)',
206             'chrome/browser/resources/chromeos/chromevox/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).extjs',
207             '<@(_outputs)',
208           ],
209         },
210       ],
211       'sources': [
212         '<@(chromevox_tests_sources)',
213         '<@(chromevox_tests_unitjs_sources)',
214         '<@(chromevox_tests_extjs_sources)',
215       ],
216     },  # target chromevox_tests
217     {
218       'target_name': 'chromevox_test_messages_js',
219       'type': 'none',
220       'actions': [
221         {
222           'action_name': 'test_messages_js',
223           'message': 'Generate <(_target_name)',
224           'variables': {
225             'english_messages_file': '<(chromevox_dest_dir)/_locales/en/messages.json',
226           },
227           'inputs': [
228             'tools/generate_test_messages.py',
229             '<(english_messages_file)',
230           ],
231           'outputs': [
232             '<(chromevox_test_messages_js_file)',
233           ],
234           'action': [
235             'python',
236             'tools/generate_test_messages.py',
237             '-o', '<(chromevox_test_messages_js_file)',
238             '<(english_messages_file)',
239           ],
240         },
241       ],
242     },  # target chromevox_test_messages_js
243     {
244       'target_name': 'chromevox_test_deps_js',
245       'type': 'none',
246       'actions': [
247         {
248           'action_name': 'deps_js',
249           'message': 'Generate <(_target_name)',
250           'variables': {
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',
254             'js_files': [
255               '<!@(python tools/find_js_files.py . <(DEPTH)/<(closure_dir))',
256               '<(chromevox_test_messages_js_file)',
257             ],
258           },
259           'inputs': [
260             '<@(js_files)',
261             '<(depswriter_path)',
262           ],
263           'outputs': [
264             '<(chromevox_test_deps_js_file)',
265           ],
266           'action': [
267             'python',
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)',
273             '<@(js_files)',
274           ],
275         },
276       ],
277       'dependencies': [
278         'chromevox_test_messages_js',
279       ],
280     },  # target chromevox_test_deps_js
281   ],