cc: Skip commit state timer on sync compositor
[chromium-blink-merge.git] / ppapi / ppapi_tests.gypi
blobf9447d438d5a6f7a7fa0f95eacda0b5ee99c4999
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         # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
129         ['OS=="linux" and ((use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1))', {
130           'dependencies': [
131             '../base/allocator/allocator.gyp:allocator',
132           ],
133         }],
134       ],
135     },
136     {
137       'target_name': 'ppapi_unittests',
138       'type': 'executable',
139       'variables': {
140         'chromium_code': 1,
141       },
142       'dependencies': [
143         'ppapi_host',
144         'ppapi_proxy',
145         'ppapi_shared',
146         'ppapi_unittest_shared',
147         '../base/base.gyp:run_all_unittests',
148         '../base/base.gyp:test_support_base',
149         '../gpu/gpu.gyp:gpu_ipc',
150         '../ipc/ipc.gyp:ipc',
151         '../ipc/ipc.gyp:test_support_ipc',
152         '../media/media.gyp:shared_memory_support',
153         '../testing/gmock.gyp:gmock',
154         '../testing/gtest.gyp:gtest',
155         '../ui/surface/surface.gyp:surface',
156       ],
157       # For the nacl_http_response_headers_unittest below.
158       'include_dirs': [
159         '../ppapi',
160       ],
161       'sources': [
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/file_system_resource_unittest.cc',
175         'proxy/flash_resource_unittest.cc',
176         'proxy/interface_list_unittest.cc',
177         'proxy/mock_resource.cc',
178         'proxy/mock_resource.h',
179         'proxy/nacl_message_scanner_unittest.cc',
180         'proxy/pdf_resource_unittest.cc',
181         'proxy/plugin_dispatcher_unittest.cc',
182         'proxy/plugin_resource_tracker_unittest.cc',
183         'proxy/plugin_var_tracker_unittest.cc',
184         'proxy/ppb_var_unittest.cc',
185         'proxy/ppp_instance_private_proxy_unittest.cc',
186         'proxy/ppp_instance_proxy_unittest.cc',
187         'proxy/ppp_messaging_proxy_unittest.cc',
188         'proxy/printing_resource_unittest.cc',
189         'proxy/raw_var_data_unittest.cc',
190         'proxy/serialized_var_unittest.cc',
191         'proxy/talk_resource_unittest.cc',
192         'proxy/websocket_resource_unittest.cc',
193         'shared_impl/media_stream_buffer_manager_unittest.cc',
194         'shared_impl/media_stream_video_track_shared_unittest.cc',
195         'shared_impl/proxy_lock_unittest.cc',
196         'shared_impl/resource_tracker_unittest.cc',
197         'shared_impl/thread_aware_callback_unittest.cc',
198         'shared_impl/time_conversion_unittest.cc',
199         'shared_impl/tracked_callback_unittest.cc',
200         'shared_impl/var_tracker_unittest.cc',
201         'shared_impl/var_value_conversions_unittest.cc',
202       ],
203       'conditions': [
204         [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
205           'conditions': [
206             # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
207             [ '(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)', {
208               'dependencies': [
209                 '../base/allocator/allocator.gyp:allocator',
210               ],
211             }],
212           ],
213         }],
214       ],
215       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
216       'msvs_disabled_warnings': [ 4267, ],
217     },
218     {
219       'target_name': 'ppapi_example_skeleton',
220       'suppress_wildcard': 1,
221       'type': 'none',
222       'direct_dependent_settings': {
223         'product_name': '>(_target_name)',
224         'conditions': [
225           ['os_posix==1 and OS!="mac"', {
226             'cflags': ['-fvisibility=hidden'],
227             'type': 'shared_library',
228           }],
229           ['OS=="win"', {
230             'type': 'shared_library',
231           }],
232           ['OS=="mac"', {
233             'type': 'loadable_module',
234             'mac_bundle': 1,
235             'product_extension': 'plugin',
236             'xcode_settings': {
237               'OTHER_LDFLAGS': [
238                 # Not to strip important symbols by -Wl,-dead_strip.
239                 '-Wl,-exported_symbol,_PPP_GetInterface',
240                 '-Wl,-exported_symbol,_PPP_InitializeModule',
241                 '-Wl,-exported_symbol,_PPP_ShutdownModule'
242               ]},
243           }],
244         ],
245       },
246     },
247     {
248       'target_name': 'ppapi_example_mouse_cursor',
249       'dependencies': [
250         'ppapi_example_skeleton',
251         'ppapi.gyp:ppapi_cpp',
252       ],
253       'sources': [
254         'examples/mouse_cursor/mouse_cursor.cc',
255       ],
256     },
257     {
258       'target_name': 'ppapi_example_mouse_lock',
259       'dependencies': [
260         'ppapi_example_skeleton',
261         'ppapi.gyp:ppapi_cpp',
262       ],
263       'sources': [
264         'examples/mouse_lock/mouse_lock.cc',
265       ],
266     },
268     {
269       'target_name': 'ppapi_example_gamepad',
270       'dependencies': [
271         'ppapi_example_skeleton',
272         'ppapi.gyp:ppapi_cpp',
273       ],
274       'sources': [
275         'examples/gamepad/gamepad.cc',
276       ],
277       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
278       'msvs_disabled_warnings': [ 4267, ],
279     },
281     {
282       'target_name': 'ppapi_example_c_stub',
283       'dependencies': [
284         'ppapi_example_skeleton',
285         'ppapi.gyp:ppapi_c',
286       ],
287       'sources': [
288         'examples/stub/stub.c',
289       ],
290     },
291     {
292       'target_name': 'ppapi_example_cc_stub',
293       'dependencies': [
294         'ppapi_example_skeleton',
295         'ppapi.gyp:ppapi_cpp',
296       ],
297       'sources': [
298         'examples/stub/stub.cc',
299       ],
300     },
301     {
302       'target_name': 'ppapi_example_crxfs',
303       'dependencies': [
304         'ppapi_example_skeleton',
305         'ppapi.gyp:ppapi_cpp',
306       ],
307       'sources': [
308         'examples/crxfs/crxfs.cc',
309       ],
310     },
311     {
312       'target_name': 'ppapi_example_audio',
313       'dependencies': [
314         'ppapi_example_skeleton',
315         'ppapi.gyp:ppapi_cpp',
316       ],
317       'sources': [
318         'examples/audio/audio.cc',
319       ],
320     },
321     {
322       'target_name': 'ppapi_example_audio_input',
323       'dependencies': [
324         'ppapi_example_skeleton',
325         'ppapi.gyp:ppapi_cpp',
326       ],
327       'sources': [
328         'examples/audio_input/audio_input.cc',
329       ],
330     },
331     {
332       'target_name': 'ppapi_example_file_chooser',
333       'dependencies': [
334         'ppapi_example_skeleton',
335         'ppapi.gyp:ppapi_cpp',
336       ],
337       'sources': [
338         'examples/file_chooser/file_chooser.cc',
339       ],
340     },
341     {
342       'target_name': 'ppapi_example_graphics_2d',
343       'dependencies': [
344         'ppapi_example_skeleton',
345         'ppapi.gyp:ppapi_c',
346       ],
347       'sources': [
348         'examples/2d/graphics_2d_example.c',
349       ],
350     },
351     {
352       'target_name': 'ppapi_example_ime',
353       'dependencies': [
354         'ppapi_example_skeleton',
355         'ppapi.gyp:ppapi_cpp',
356       ],
357       'sources': [
358         'examples/ime/ime.cc',
359       ],
360       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
361       'msvs_disabled_warnings': [ 4267, ],
362     },
363     {
364       'target_name': 'ppapi_example_paint_manager',
365       'dependencies': [
366         'ppapi_example_skeleton',
367         'ppapi.gyp:ppapi_cpp',
368       ],
369       'sources': [
370         'examples/2d/paint_manager_example.cc',
371       ],
372     },
373     {
374       'target_name': 'ppapi_example_input',
375       'dependencies': [
376         'ppapi_example_skeleton',
377         'ppapi.gyp:ppapi_cpp',
378       ],
379       'sources': [
380         'examples/input/pointer_event_input.cc',
381       ],
382     },
383     {
384       'target_name': 'ppapi_example_post_message',
385       'dependencies': [
386         'ppapi_example_skeleton',
387         'ppapi.gyp:ppapi_cpp',
388       ],
389       'sources': [
390         'examples/scripting/post_message.cc',
391       ],
392     },
393     {
394       'target_name': 'ppapi_example_scaling',
395       'dependencies': [
396         'ppapi_example_skeleton',
397         'ppapi.gyp:ppapi_cpp',
398       ],
399       'sources': [
400         'examples/scaling/scaling.cc',
401       ],
402     },
403     {
404       'target_name': 'ppapi_example_scroll',
405       'dependencies': [
406         'ppapi_example_skeleton',
407         'ppapi.gyp:ppapi_cpp',
408       ],
409       'sources': [
410         'examples/2d/scroll.cc',
411       ],
412     },
413     {
414       'target_name': 'ppapi_example_simple_font',
415       'dependencies': [
416         'ppapi_example_skeleton',
417         'ppapi.gyp:ppapi_cpp',
418       ],
419       'sources': [
420         'examples/font/simple_font.cc',
421       ],
422     },
423     {
424       'target_name': 'ppapi_example_url_loader',
425       'dependencies': [
426         'ppapi_example_skeleton',
427         'ppapi.gyp:ppapi_cpp',
428       ],
429       'sources': [
430         'examples/url_loader/streaming.cc',
431       ],
432     },
433     {
434       'target_name': 'ppapi_example_url_loader_file',
435       'dependencies': [
436         'ppapi_example_skeleton',
437         'ppapi.gyp:ppapi_cpp',
438       ],
439       'sources': [
440         'examples/url_loader/stream_to_file.cc',
441       ],
442     },
443     {
444       'target_name': 'ppapi_example_gles2',
445       'dependencies': [
446         'ppapi_example_skeleton',
447         'ppapi.gyp:ppapi_cpp',
448         'ppapi.gyp:ppapi_gles2',
449       ],
450       'include_dirs': [
451         'lib/gl/include',
452       ],
453       'sources': [
454         'examples/gles2/gles2.cc',
455       ],
456     },
457     {
458       'target_name': 'ppapi_example_video_decode',
459       'dependencies': [
460         'ppapi_example_skeleton',
461         'ppapi.gyp:ppapi_cpp',
462         'ppapi.gyp:ppapi_gles2',
463       ],
464       'include_dirs': [
465         'lib/gl/include',
466       ],
467       'sources': [
468         'examples/video_decode/video_decode.cc',
469         'examples/video_decode/testdata.h',
470       ],
471       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
472       'msvs_disabled_warnings': [ 4267, ],
473     },
474     {
475       'target_name': 'ppapi_example_vc',
476       'dependencies': [
477         'ppapi_example_skeleton',
478         'ppapi.gyp:ppapi_cpp',
479         'ppapi.gyp:ppapi_gles2',
480       ],
481       'include_dirs': [
482         'lib/gl/include',
483       ],
484       'sources': [
485         'examples/video_capture/video_capture.cc',
486       ],
487     },
488     {
489       'target_name': 'ppapi_example_video_effects',
490       'dependencies': [
491         'ppapi_example_skeleton',
492         'ppapi.gyp:ppapi_cpp',
493       ],
494       'sources': [
495         'examples/video_effects/video_effects.cc',
496       ],
497     },
498     {
499       'target_name': 'ppapi_example_enumerate_devices',
500       'dependencies': [
501         'ppapi_example_skeleton',
502         'ppapi.gyp:ppapi_cpp',
503       ],
504       'sources': [
505         'examples/enumerate_devices/enumerate_devices.cc',
506       ],
507     },
508     {
509       'target_name': 'ppapi_example_flash_topmost',
510       'dependencies': [
511         'ppapi_example_skeleton',
512         'ppapi.gyp:ppapi_cpp',
513       ],
514       'sources': [
515         'examples/flash_topmost/flash_topmost.cc',
516       ],
517     },
518     {
519       'target_name': 'ppapi_example_printing',
520       'dependencies': [
521         'ppapi_example_skeleton',
522         'ppapi.gyp:ppapi_cpp',
523       ],
524       'sources': [
525         'examples/printing/printing.cc',
526       ],
527       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
528       'msvs_disabled_warnings': [ 4267, ],
529     },
530     {
531       'target_name': 'ppapi_example_media_stream_audio',
532       'dependencies': [
533         'ppapi_example_skeleton',
534         'ppapi.gyp:ppapi_cpp',
535       ],
536       'sources': [
537         'examples/media_stream_audio/media_stream_audio.cc',
538       ],
539     },
540     {
541       'target_name': 'ppapi_example_media_stream_video',
542       'dependencies': [
543         'ppapi_example_skeleton',
544         'ppapi.gyp:ppapi_cpp',
545         'ppapi.gyp:ppapi_gles2',
546       ],
547       'include_dirs': [
548         'lib/gl/include',
549       ],
550       'sources': [
551         'examples/media_stream_video/media_stream_video.cc',
552       ],
553     },
554   ],