Extend batched shutdown to include the in-progress downloads dialog.
[chromium-blink-merge.git] / ppapi / ppapi_tests.gypi
blobcf755c1fafb6a9517b7d065978eada6a9834a15e
1 # Copyright (c) 2012 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   'targets': [
7     {
8       'target_name': 'ppapi_tests',
9       'type': 'loadable_module',
10       'include_dirs': [
11         'lib/gl/include',
12       ],
13       'defines': [
14         'GL_GLEXT_PROTOTYPES',
15       ],
16       'sources': [
17         '<@(test_common_source_files)',
18         '<@(test_trusted_source_files)',
19       ],
20       'dependencies': [
21         'ppapi.gyp:ppapi_cpp',
22         'ppapi_internal.gyp:ppapi_shared',
23       ],
24       'copies': [
25         {
26           'destination': '<(PRODUCT_DIR)',
27           'files': [
28             # Keep 'test_case.html.mock-http-headers' with 'test_case.html'.
29             'tests/test_case.html',
30             'tests/test_case.html.mock-http-headers',
31             'tests/test_page.css',
32             'tests/ppapi_nacl_tests_newlib.nmf',
33           ],
34         },
35         {
36           'destination': '<(PRODUCT_DIR)/test_url_loader_data',
37           'files': [
38             'tests/test_url_loader_data/hello.txt',
39           ],
40         },
41       ],
42       'run_as': {
43         'action': [
44           '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)chrome<(EXECUTABLE_SUFFIX)',
45           '--enable-pepper-testing',
46           '--register-pepper-plugins=$(TargetPath);application/x-ppapi-tests',
47           'file://$(ProjectDir)/tests/test_case.html?testcase=',
48         ],
49       },
50       'conditions': [
51         ['OS=="win"', {
52           'defines': [
53             '_CRT_SECURE_NO_DEPRECATE',
54             '_CRT_NONSTDC_NO_WARNINGS',
55             '_CRT_NONSTDC_NO_DEPRECATE',
56             '_SCL_SECURE_NO_DEPRECATE',
57           ],
58           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
59           'msvs_disabled_warnings': [ 4267, ],
60         }],
61         ['OS=="mac"', {
62           'mac_bundle': 1,
63           'product_name': 'ppapi_tests',
64           'product_extension': 'plugin',
65         }],
66       ],
67       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
68       'msvs_disabled_warnings': [ 4267, ],
69 # TODO(dmichael):  Figure out what is wrong with the script on Windows and add
70 #                  it as an automated action.
71 #      'actions': [
72 #        {
73 #          'action_name': 'generate_ppapi_include_tests',
74 #          'inputs': [],
75 #          'outputs': [
76 #            'tests/test_c_includes.c',
77 #            'tests/test_cc_includes.cc',
78 #          ],
79 #          'action': [
80 #            '<!@(python generate_ppapi_include_tests.py)',
81 #          ],
82 #        },
83 #      ],
84     },
85     {
86       'target_name': 'ppapi_unittest_shared',
87       'type': 'static_library',
88       'dependencies': [
89         'ppapi_proxy',
90         'ppapi_shared',
91         '../base/base.gyp:test_support_base',
92         '../ipc/ipc.gyp:ipc',
93         '../ipc/ipc.gyp:test_support_ipc',
94         '../testing/gmock.gyp:gmock',
95         '../testing/gtest.gyp:gtest',
96       ],
97       'sources': [
98         'proxy/ppapi_proxy_test.cc',
99         'proxy/ppapi_proxy_test.h',
100         'proxy/resource_message_test_sink.cc',
101         'proxy/resource_message_test_sink.h',
102         'shared_impl/test_globals.cc',
103         'shared_impl/test_globals.h',
104         'shared_impl/unittest_utils.cc',
105         'shared_impl/unittest_utils.h',
106       ],
107     },
109     {
110       'target_name': 'ppapi_perftests',
111       'type': 'executable',
112       'variables': {
113         'chromium_code': 1,
114       },
115       'dependencies': [
116         'ppapi_proxy',
117         'ppapi_shared',
118         'ppapi_unittest_shared',
119         '../base/base.gyp:test_support_base',
120         '../testing/gtest.gyp:gtest',
121       ],
122       'sources': [
123         'proxy/ppapi_perftests.cc',
124         'proxy/ppp_messaging_proxy_perftest.cc',
125       ],
126       'conditions': [
127         # See http://crbug.com/162998#c4 for why this is needed.
128         ['OS=="linux" and linux_use_tcmalloc==1', {
129           'dependencies': [
130             '../base/allocator/allocator.gyp:allocator',
131           ],
132         }],
133       ],
134     },
135     {
136       'target_name': 'ppapi_unittests',
137       'type': 'executable',
138       'variables': {
139         'chromium_code': 1,
140       },
141       'dependencies': [
142         'ppapi_host',
143         'ppapi_proxy',
144         'ppapi_shared',
145         'ppapi_unittest_shared',
146         '../base/base.gyp:test_support_base',
147         '../gpu/gpu.gyp:gpu_ipc',
148         '../ipc/ipc.gyp:ipc',
149         '../ipc/ipc.gyp:test_support_ipc',
150         '../media/media.gyp:shared_memory_support',
151         '../testing/gmock.gyp:gmock',
152         '../testing/gtest.gyp:gtest',
153         '../ui/surface/surface.gyp:surface',
154       ],
155       # For the nacl_http_response_headers_unittest below.
156       'include_dirs': [
157         '../ppapi',
158       ],
159       'sources': [
160         'proxy/run_all_unittests.cc',
162         'host/resource_message_filter_unittest.cc',
163         # Piggy back on ppapi_unittests for a simple NaCl unittest,
164         # which must not have dependencies on anything other than stdlibs.
165         # We add the source file, not just the test to ensure that the object
166         # is built.  Otherwise, we would need to depend on the NaCl trusted
167         # plugin being built to build the object.
168         # TODO(jvoung): move this to unit_tests instead of ppapi_unittests
169         # once this moves into chrome.
170         'native_client/src/trusted/plugin/nacl_http_response_headers.cc',
171         'native_client/src/trusted/plugin/nacl_http_response_headers_unittest.cc',
172         'proxy/device_enumeration_resource_helper_unittest.cc',
173         'proxy/file_chooser_resource_unittest.cc',
174         'proxy/flash_resource_unittest.cc',
175         'proxy/mock_resource.cc',
176         'proxy/mock_resource.h',
177         'proxy/pdf_resource_unittest.cc',
178         'proxy/plugin_dispatcher_unittest.cc',
179         'proxy/plugin_resource_tracker_unittest.cc',
180         'proxy/plugin_var_tracker_unittest.cc',
181         'proxy/ppb_var_unittest.cc',
182         'proxy/ppp_instance_private_proxy_unittest.cc',
183         'proxy/ppp_instance_proxy_unittest.cc',
184         'proxy/ppp_messaging_proxy_unittest.cc',
185         'proxy/printing_resource_unittest.cc',
186         'proxy/raw_var_data_unittest.cc',
187         'proxy/serialized_var_unittest.cc',
188         'proxy/talk_resource_unittest.cc',
189         'proxy/websocket_resource_unittest.cc',
190         'shared_impl/proxy_lock_unittest.cc',
191         'shared_impl/resource_tracker_unittest.cc',
192         'shared_impl/thread_aware_callback_unittest.cc',
193         'shared_impl/time_conversion_unittest.cc',
194         'shared_impl/tracked_callback_unittest.cc',
195         'shared_impl/var_tracker_unittest.cc',
196         'shared_impl/var_value_conversions_unittest.cc',
197       ],
198       'conditions': [
199         [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
200           'conditions': [
201             [ 'linux_use_tcmalloc == 1', {
202               'dependencies': [
203                 '../base/allocator/allocator.gyp:allocator',
204               ],
205             }],
206           ],
207         }],
208       ],
209       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
210       'msvs_disabled_warnings': [ 4267, ],          
211     },
212     {
213       'target_name': 'ppapi_example_skeleton',
214       'suppress_wildcard': 1,
215       'type': 'none',
216       'direct_dependent_settings': {
217         'product_name': '>(_target_name)',
218         'conditions': [
219           ['os_posix==1 and OS!="mac"', {
220             'cflags': ['-fvisibility=hidden'],
221             'type': 'shared_library',
222           }],
223           ['OS=="win"', {
224             'type': 'shared_library',
225           }],
226           ['OS=="mac"', {
227             'type': 'loadable_module',
228             'mac_bundle': 1,
229             'product_extension': 'plugin',
230             'xcode_settings': {
231               'OTHER_LDFLAGS': [
232                 # Not to strip important symbols by -Wl,-dead_strip.
233                 '-Wl,-exported_symbol,_PPP_GetInterface',
234                 '-Wl,-exported_symbol,_PPP_InitializeModule',
235                 '-Wl,-exported_symbol,_PPP_ShutdownModule'
236               ]},
237           }],
238         ],
239       },
240     },
241     {
242       'target_name': 'ppapi_example_mouse_cursor',
243       'dependencies': [
244         'ppapi_example_skeleton',
245         'ppapi.gyp:ppapi_cpp',
246       ],
247       'sources': [
248         'examples/mouse_cursor/mouse_cursor.cc',
249       ],
250     },
251     {
252       'target_name': 'ppapi_example_mouse_lock',
253       'dependencies': [
254         'ppapi_example_skeleton',
255         'ppapi.gyp:ppapi_cpp',
256       ],
257       'sources': [
258         'examples/mouse_lock/mouse_lock.cc',
259       ],
260     },
262     {
263       'target_name': 'ppapi_example_gamepad',
264       'dependencies': [
265         'ppapi_example_skeleton',
266         'ppapi.gyp:ppapi_cpp',
267       ],
268       'sources': [
269         'examples/gamepad/gamepad.cc',
270       ],
271       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
272       'msvs_disabled_warnings': [ 4267, ],
273     },
275     {
276       'target_name': 'ppapi_example_c_stub',
277       'dependencies': [
278         'ppapi_example_skeleton',
279         'ppapi.gyp:ppapi_c',
280       ],
281       'sources': [
282         'examples/stub/stub.c',
283       ],
284     },
285     {
286       'target_name': 'ppapi_example_cc_stub',
287       'dependencies': [
288         'ppapi_example_skeleton',
289         'ppapi.gyp:ppapi_cpp',
290       ],
291       'sources': [
292         'examples/stub/stub.cc',
293       ],
294     },
295     {
296       'target_name': 'ppapi_example_crxfs',
297       'dependencies': [
298         'ppapi_example_skeleton',
299         'ppapi.gyp:ppapi_cpp',
300       ],
301       'sources': [
302         'examples/crxfs/crxfs.cc',
303       ],
304     },
305     {
306       'target_name': 'ppapi_example_audio',
307       'dependencies': [
308         'ppapi_example_skeleton',
309         'ppapi.gyp:ppapi_cpp',
310       ],
311       'sources': [
312         'examples/audio/audio.cc',
313       ],
314     },
315     {
316       'target_name': 'ppapi_example_audio_input',
317       'dependencies': [
318         'ppapi_example_skeleton',
319         'ppapi.gyp:ppapi_cpp',
320       ],
321       'sources': [
322         'examples/audio_input/audio_input.cc',
323       ],
324     },
325     {
326       'target_name': 'ppapi_example_file_chooser',
327       'dependencies': [
328         'ppapi_example_skeleton',
329         'ppapi.gyp:ppapi_cpp',
330       ],
331       'sources': [
332         'examples/file_chooser/file_chooser.cc',
333       ],
334     },
335     {
336       'target_name': 'ppapi_example_graphics_2d',
337       'dependencies': [
338         'ppapi_example_skeleton',
339         'ppapi.gyp:ppapi_c',
340       ],
341       'sources': [
342         'examples/2d/graphics_2d_example.c',
343       ],
344     },
345     {
346       'target_name': 'ppapi_example_ime',
347       'dependencies': [
348         'ppapi_example_skeleton',
349         'ppapi.gyp:ppapi_cpp',
350       ],
351       'sources': [
352         'examples/ime/ime.cc',
353       ],
354       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
355       'msvs_disabled_warnings': [ 4267, ],
356     },
357     {
358       'target_name': 'ppapi_example_paint_manager',
359       'dependencies': [
360         'ppapi_example_skeleton',
361         'ppapi.gyp:ppapi_cpp',
362       ],
363       'sources': [
364         'examples/2d/paint_manager_example.cc',
365       ],
366     },
367     {
368       'target_name': 'ppapi_example_input',
369       'dependencies': [
370         'ppapi_example_skeleton',
371         'ppapi.gyp:ppapi_cpp',
372       ],
373       'sources': [
374         'examples/input/pointer_event_input.cc',
375       ],
376     },
377     {
378       'target_name': 'ppapi_example_post_message',
379       'dependencies': [
380         'ppapi_example_skeleton',
381         'ppapi.gyp:ppapi_cpp',
382       ],
383       'sources': [
384         'examples/scripting/post_message.cc',
385       ],
386     },
387     {
388       'target_name': 'ppapi_example_scaling',
389       'dependencies': [
390         'ppapi_example_skeleton',
391         'ppapi.gyp:ppapi_cpp',
392       ],
393       'sources': [
394         'examples/scaling/scaling.cc',
395       ],
396     },
397     {
398       'target_name': 'ppapi_example_scroll',
399       'dependencies': [
400         'ppapi_example_skeleton',
401         'ppapi.gyp:ppapi_cpp',
402       ],
403       'sources': [
404         'examples/2d/scroll.cc',
405       ],
406     },
407     {
408       'target_name': 'ppapi_example_simple_font',
409       'dependencies': [
410         'ppapi_example_skeleton',
411         'ppapi.gyp:ppapi_cpp',
412       ],
413       'sources': [
414         'examples/font/simple_font.cc',
415       ],
416     },
417     {
418       'target_name': 'ppapi_example_url_loader',
419       'dependencies': [
420         'ppapi_example_skeleton',
421         'ppapi.gyp:ppapi_cpp',
422       ],
423       'sources': [
424         'examples/url_loader/streaming.cc',
425       ],
426     },
427     {
428       'target_name': 'ppapi_example_url_loader_file',
429       'dependencies': [
430         'ppapi_example_skeleton',
431         'ppapi.gyp:ppapi_cpp',
432       ],
433       'sources': [
434         'examples/url_loader/stream_to_file.cc',
435       ],
436     },
437     {
438       'target_name': 'ppapi_example_gles2',
439       'dependencies': [
440         'ppapi_example_skeleton',
441         'ppapi.gyp:ppapi_cpp',
442         'ppapi.gyp:ppapi_gles2',
443       ],
444       'include_dirs': [
445         'lib/gl/include',
446       ],
447       'sources': [
448         'examples/gles2/gles2.cc',
449       ],
450     },
451     {
452       'target_name': 'ppapi_example_video_decode',
453       'dependencies': [
454         'ppapi_example_skeleton',
455         'ppapi.gyp:ppapi_cpp',
456         'ppapi.gyp:ppapi_gles2',
457       ],
458       'include_dirs': [
459         'lib/gl/include',
460       ],
461       'sources': [
462         'examples/video_decode/video_decode.cc',
463         'examples/video_decode/testdata.h',
464       ],
465       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
466       'msvs_disabled_warnings': [ 4267, ],
467     },
468     {
469       'target_name': 'ppapi_example_vc',
470       'dependencies': [
471         'ppapi_example_skeleton',
472         'ppapi.gyp:ppapi_cpp',
473         'ppapi.gyp:ppapi_gles2',
474       ],
475       'include_dirs': [
476         'lib/gl/include',
477       ],
478       'sources': [
479         'examples/video_capture/video_capture.cc',
480       ],
481     },
482     {
483       'target_name': 'ppapi_example_video_effects',
484       'dependencies': [
485         'ppapi_example_skeleton',
486         'ppapi.gyp:ppapi_cpp',
487       ],
488       'sources': [
489         'examples/video_effects/video_effects.cc',
490       ],
491     },
492     {
493       'target_name': 'ppapi_example_enumerate_devices',
494       'dependencies': [
495         'ppapi_example_skeleton',
496         'ppapi.gyp:ppapi_cpp',
497       ],
498       'sources': [
499         'examples/enumerate_devices/enumerate_devices.cc',
500       ],
501     },
502     {
503       'target_name': 'ppapi_example_flash_topmost',
504       'dependencies': [
505         'ppapi_example_skeleton',
506         'ppapi.gyp:ppapi_cpp',
507       ],
508       'sources': [
509         'examples/flash_topmost/flash_topmost.cc',
510       ],
511     },
512     {
513       'target_name': 'ppapi_example_printing',
514       'dependencies': [
515         'ppapi_example_skeleton',
516         'ppapi.gyp:ppapi_cpp',
517       ],
518       'sources': [
519         'examples/printing/printing.cc',
520       ],
521       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
522       'msvs_disabled_warnings': [ 4267, ],
523     },
524   ],