Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / resources / chromeos / chromevox / chromevox_tests.gypi
blobca47324e340ea1d5b9bbd40f542fa47e8228f152
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_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',
34     ],
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',
71     ],
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',
78     ],
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',
88     ],
89   },
90   'targets': [
91     {
92       'target_name': 'chromevox_tests',
93       'type': 'executable',
94       'dependencies': [
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',
109       ],
110       'conditions': [
111         [ 'cld_version==0 or cld_version==2', {
112           'dependencies': [
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', ],
116         }],
117         ['disable_nacl==0 and disable_nacl_untrusted==0', {
118           'dependencies': [
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',
122           ],
123         }],
124       ],
125       'defines': [
126         'HAS_OUT_OF_PROC_TEST_RUNNER',
127       ],
128       'include_dirs': [
129         '<(DEPTH)',
130         '<(SHARED_INTERMEDIATE_DIR)',
131       ],
132       'rules': [
133         {
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,
140           'variables': {
141             'conditions': [
142               ['v8_use_external_startup_data==1', {
143                 'external_v8': 'y',
144               }, {
145                 'external_v8': 'n',
146               }],
147             ],
148           },
149           'inputs': [
150             '<(gypv8sh)',
151             '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
152             '<(mock_js)',
153             '<(test_api_js)',
154             '<(js2gtest)',
155             '<(chromevox_test_deps_js_file)',
156             '<@(chromevox_tests_unit_gen_include_sources)',
157           ],
158           'outputs': [
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',
161           ],
162           'process_outputs_as_sources': 1,
163           'action': [
164             'python',
165             '<(gypv8sh)',
166             '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
167             '--deps_js', '<(chromevox_test_deps_js_file)',
168             '--external', '<(external_v8)',
169             '<(mock_js)',
170             '<(test_api_js)',
171             '<(js2gtest)',
172             'webui',
173             '<(RULE_INPUT_PATH)',
174             'chrome/browser/resources/chromeos/chromevox/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).unitjs',
175             '<@(_outputs)',
176           ],
177         },
178         {
179           # A JavaScript test that runs in the ChromeVox background page's
180           # isolate.
181           'rule_name': 'js2extension',
182           'extension': 'extjs',
183           'msvs_external_rule': 1,
184           'variables': {
185             'conditions': [
186               ['v8_use_external_startup_data==1', {
187                 'external_v8': 'y',
188               }, {
189                 'external_v8': 'n',
190               }],
191             ],
192           },
193           'inputs': [
194             '<(gypv8sh)',
195             '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
196             '<(mock_js)',
197             '<(test_api_js)',
198             '<(js2gtest)',
199             '<@(chromevox_tests_ext_gen_include_sources)',
200           ],
201           'outputs': [
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',
204           ],
205           'process_outputs_as_sources': 1,
206           'action': [
207             'python',
208             '<(gypv8sh)',
209             '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
210             '--external', '<(external_v8)',
211             '<(mock_js)',
212             '<(test_api_js)',
213             '<(js2gtest)',
214             'extension',
215             '<(RULE_INPUT_PATH)',
216             'chrome/browser/resources/chromeos/chromevox/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).extjs',
217             '<@(_outputs)',
218           ],
219         },
220       ],
221       'sources': [
222         '<@(chromevox_tests_sources)',
223         '<@(chromevox_tests_unitjs_sources)',
224         '<@(chromevox_tests_extjs_sources)',
225       ],
226     },  # target chromevox_tests
227     {
228       'target_name': 'chromevox_test_messages_js',
229       'type': 'none',
230       'actions': [
231         {
232           'action_name': 'test_messages_js',
233           'message': 'Generate <(_target_name)',
234           'variables': {
235             'english_messages_file': '<(chromevox_dest_dir)/_locales/en/messages.json',
236           },
237           'inputs': [
238             'tools/generate_test_messages.py',
239             '<(english_messages_file)',
240           ],
241           'outputs': [
242             '<(chromevox_test_messages_js_file)',
243           ],
244           'action': [
245             'python',
246             'tools/generate_test_messages.py',
247             '-o', '<(chromevox_test_messages_js_file)',
248             '<(english_messages_file)',
249           ],
250         },
251       ],
252     },  # target chromevox_test_messages_js
253     {
254       'target_name': 'chromevox_test_deps_js',
255       'type': 'none',
256       'actions': [
257         {
258           'action_name': 'deps_js',
259           'message': 'Generate <(_target_name)',
260           'variables': {
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',
264             'js_files': [
265               '<!@(python tools/find_js_files.py . <(DEPTH)/<(closure_dir))',
266               '<(chromevox_test_messages_js_file)',
267             ],
268           },
269           'inputs': [
270             '<@(js_files)',
271             '<(depswriter_path)',
272           ],
273           'outputs': [
274             '<(chromevox_test_deps_js_file)',
275           ],
276           'action': [
277             'python',
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)',
283             '<@(js_files)',
284           ],
285         },
286       ],
287       'dependencies': [
288         'chromevox_test_messages_js',
289       ],
290     },  # target chromevox_test_deps_js
291   ],