ServiceWorker: Decompose SWRegistration::SetVersionInternal for readability
[chromium-blink-merge.git] / ppapi / ppapi_tests.gypi
blob09d1c6cbc584936575517fef624c28150a1de033
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       # GN version: //ppapi:ppapi_tests
9       'target_name': 'ppapi_tests',
10       'type': 'loadable_module',
11       'include_dirs': [
12         'lib/gl/include',
13       ],
14       'defines': [
15         'GL_GLEXT_PROTOTYPES',
16       ],
17       'sources': [
18         '<@(test_common_source_files)',
19         '<@(test_trusted_source_files)',
20       ],
21       'dependencies': [
22         'ppapi.gyp:ppapi_cpp',
23         'ppapi_internal.gyp:ppapi_shared',
24       ],
25       'copies': [
26         {
27           'destination': '<(PRODUCT_DIR)',
28           'files': [
29             # Keep 'test_case.html.mock-http-headers' with 'test_case.html'.
30             'tests/test_case.html',
31             'tests/test_case.html.mock-http-headers',
32             'tests/test_page.css',
33             'tests/ppapi_nacl_tests_newlib.nmf',
34           ],
35         },
36         {
37           'destination': '<(PRODUCT_DIR)/test_url_loader_data',
38           'files': [
39             'tests/test_url_loader_data/hello.txt',
40           ],
41         },
42       ],
43       'run_as': {
44         'action': [
45           '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)chrome<(EXECUTABLE_SUFFIX)',
46           '--enable-pepper-testing',
47           '--register-pepper-plugins=$(TargetPath);application/x-ppapi-tests',
48           'file://$(ProjectDir)/tests/test_case.html?testcase=',
49         ],
50       },
51       'conditions': [
52         ['OS=="win"', {
53           'defines': [
54             '_CRT_SECURE_NO_DEPRECATE',
55             '_CRT_NONSTDC_NO_WARNINGS',
56             '_CRT_NONSTDC_NO_DEPRECATE',
57             '_SCL_SECURE_NO_DEPRECATE',
58           ],
59         }],
60         ['OS=="mac"', {
61           'mac_bundle': 1,
62           'product_name': 'ppapi_tests',
63           'product_extension': 'plugin',
64         }],
65       ],
66 # TODO(dmichael):  Figure out what is wrong with the script on Windows and add
67 #                  it as an automated action.
68 #      'actions': [
69 #        {
70 #          'action_name': 'generate_ppapi_include_tests',
71 #          'inputs': [],
72 #          'outputs': [
73 #            'tests/test_c_includes.c',
74 #            'tests/test_cc_includes.cc',
75 #          ],
76 #          'action': [
77 #            '<!@(python generate_ppapi_include_tests.py)',
78 #          ],
79 #        },
80 #      ],
81     },
82     {
83       # GN version: //ppapi/proxy:test_support
84       #             //ppapi/shared_impl:test_support
85       'target_name': 'ppapi_unittest_shared',
86       'type': 'static_library',
87       'dependencies': [
88         'ppapi_proxy',
89         'ppapi_shared',
90         '../base/base.gyp:test_support_base',
91         '../ipc/ipc.gyp:ipc',
92         '../ipc/ipc.gyp:test_support_ipc',
93         '../testing/gmock.gyp:gmock',
94         '../testing/gtest.gyp:gtest',
95       ],
96       'sources': [
97         # Note: sources list duplicated in GN build.
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       # GN version: //ppapi:ppapi_perftests
111       'target_name': 'ppapi_perftests',
112       'type': 'executable',
113       'variables': {
114         'chromium_code': 1,
115       },
116       'dependencies': [
117         'ppapi_proxy',
118         'ppapi_shared',
119         'ppapi_unittest_shared',
120         '../base/base.gyp:test_support_base',
121         '../testing/gtest.gyp:gtest',
122       ],
123       'sources': [
124         'proxy/ppapi_perftests.cc',
125         'proxy/ppp_messaging_proxy_perftest.cc',
126       ],
127       'conditions': [
128         # See http://crbug.com/162998#c4 for why this is needed.
129         ['OS=="linux" and use_allocator!="none"', {
130           'dependencies': [
131             '../base/allocator/allocator.gyp:allocator',
132           ],
133         }],
134       ],
135     },
136     {
137       # GN version: //ppapi:ppapi_unittests
138       'target_name': 'ppapi_unittests',
139       'type': 'executable',
140       'variables': {
141         'chromium_code': 1,
142       },
143       'dependencies': [
144         'ppapi_host',
145         'ppapi_proxy',
146         'ppapi_shared',
147         'ppapi_unittest_shared',
148         '../base/base.gyp:run_all_unittests',
149         '../base/base.gyp:test_support_base',
150         '../gpu/gpu.gyp:gpu_ipc',
151         '../ipc/ipc.gyp:ipc',
152         '../ipc/ipc.gyp:test_support_ipc',
153         '../media/media.gyp:shared_memory_support',
154         '../testing/gmock.gyp:gmock',
155         '../testing/gtest.gyp:gtest',
156         '../ui/surface/surface.gyp:surface',
157       ],
158       'sources': [
159         # Note: sources list duplicated in GN build.
160         'host/resource_message_filter_unittest.cc',
161         'proxy/device_enumeration_resource_helper_unittest.cc',
162         'proxy/file_chooser_resource_unittest.cc',
163         'proxy/file_system_resource_unittest.cc',
164         'proxy/flash_resource_unittest.cc',
165         'proxy/interface_list_unittest.cc',
166         'proxy/mock_resource.cc',
167         'proxy/mock_resource.h',
168         'proxy/nacl_message_scanner_unittest.cc',
169         'proxy/pdf_resource_unittest.cc',
170         'proxy/plugin_dispatcher_unittest.cc',
171         'proxy/plugin_resource_tracker_unittest.cc',
172         'proxy/plugin_var_tracker_unittest.cc',
173         'proxy/ppb_var_unittest.cc',
174         'proxy/ppp_instance_private_proxy_unittest.cc',
175         'proxy/ppp_instance_proxy_unittest.cc',
176         'proxy/ppp_messaging_proxy_unittest.cc',
177         'proxy/printing_resource_unittest.cc',
178         'proxy/raw_var_data_unittest.cc',
179         'proxy/serialized_var_unittest.cc',
180         'proxy/tracked_callback_unittest.cc',
181         'proxy/video_decoder_resource_unittest.cc',
182         'proxy/video_encoder_resource_unittest.cc',
183         'proxy/websocket_resource_unittest.cc',
184         'shared_impl/media_stream_audio_track_shared_unittest.cc',
185         'shared_impl/media_stream_buffer_manager_unittest.cc',
186         'shared_impl/media_stream_video_track_shared_unittest.cc',
187         'shared_impl/proxy_lock_unittest.cc',
188         'shared_impl/resource_tracker_unittest.cc',
189         'shared_impl/thread_aware_callback_unittest.cc',
190         'shared_impl/time_conversion_unittest.cc',
191         'shared_impl/var_tracker_unittest.cc',
192       ],
193       'conditions': [
194         [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
195           'conditions': [
196             [ 'use_allocator!="none"', {
197               'dependencies': [
198                 '../base/allocator/allocator.gyp:allocator',
199               ],
200             }],
201           ],
202         }],
203       ],
204     },
205     {
206       'target_name': 'ppapi_example_skeleton',
207       'suppress_wildcard': 1,
208       'type': 'none',
209       'direct_dependent_settings': {
210         'product_name': '>(_target_name)',
211         'conditions': [
212           ['os_posix==1 and OS!="mac"', {
213             'cflags': ['-fvisibility=hidden'],
214             'type': 'shared_library',
215           }],
216           ['OS=="win"', {
217             'type': 'shared_library',
218           }],
219           ['OS=="mac"', {
220             'type': 'loadable_module',
221             'mac_bundle': 1,
222             'product_extension': 'plugin',
223             'xcode_settings': {
224               'OTHER_LDFLAGS': [
225                 # Not to strip important symbols by -Wl,-dead_strip.
226                 '-Wl,-exported_symbol,_PPP_GetInterface',
227                 '-Wl,-exported_symbol,_PPP_InitializeModule',
228                 '-Wl,-exported_symbol,_PPP_ShutdownModule'
229               ]},
230           }],
231         ],
232       },
233     },
234     {
235       # GN version: //ppapi/examples/mouse_cursor
236       'target_name': 'ppapi_example_mouse_cursor',
237       'dependencies': [
238         'ppapi_example_skeleton',
239         'ppapi.gyp:ppapi_cpp',
240       ],
241       'sources': [
242         'examples/mouse_cursor/mouse_cursor.cc',
243       ],
244     },
245     {
246       # GN version: //ppapi/examples/mouse_lock
247       'target_name': 'ppapi_example_mouse_lock',
248       'dependencies': [
249         'ppapi_example_skeleton',
250         'ppapi.gyp:ppapi_cpp',
251       ],
252       'sources': [
253         'examples/mouse_lock/mouse_lock.cc',
254       ],
255     },
257     {
258       # GN version: //ppapi/examples/gamepad
259       'target_name': 'ppapi_example_gamepad',
260       'dependencies': [
261         'ppapi_example_skeleton',
262         'ppapi.gyp:ppapi_cpp',
263       ],
264       'sources': [
265         'examples/gamepad/gamepad.cc',
266       ],
267     },
269     {
270       # GN version: //ppapi/examples/stub:c_stub
271       'target_name': 'ppapi_example_c_stub',
272       'dependencies': [
273         'ppapi_example_skeleton',
274         'ppapi.gyp:ppapi_c',
275       ],
276       'sources': [
277         'examples/stub/stub.c',
278       ],
279     },
280     {
281       # GN version: //ppapi/examples/stub:cc_stub
282       'target_name': 'ppapi_example_cc_stub',
283       'dependencies': [
284         'ppapi_example_skeleton',
285         'ppapi.gyp:ppapi_cpp',
286       ],
287       'sources': [
288         'examples/stub/stub.cc',
289       ],
290     },
291     {
292       # GN version: //ppapi/examples/crxfs
293       'target_name': 'ppapi_example_crxfs',
294       'dependencies': [
295         'ppapi_example_skeleton',
296         'ppapi.gyp:ppapi_cpp',
297       ],
298       'sources': [
299         'examples/crxfs/crxfs.cc',
300       ],
301     },
302     {
303       # GN version: //ppapi/examples/audio
304       'target_name': 'ppapi_example_audio',
305       'dependencies': [
306         'ppapi_example_skeleton',
307         'ppapi.gyp:ppapi_cpp',
308       ],
309       'sources': [
310         'examples/audio/audio.cc',
311       ],
312     },
313     {
314       # GN version: //ppapi/examples/audio_input
315       'target_name': 'ppapi_example_audio_input',
316       'dependencies': [
317         'ppapi_example_skeleton',
318         'ppapi.gyp:ppapi_cpp',
319       ],
320       'sources': [
321         'examples/audio_input/audio_input.cc',
322       ],
323     },
324     {
325       # GN version: //ppapi/examples/file_chooser
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       # GN version: //ppapi/examples/2d:graphics_2d
337       'target_name': 'ppapi_example_graphics_2d',
338       'dependencies': [
339         'ppapi_example_skeleton',
340         'ppapi.gyp:ppapi_c',
341       ],
342       'sources': [
343         'examples/2d/graphics_2d_example.c',
344       ],
345     },
346     {
347       # GN version: //ppapi/examples/ime
348       'target_name': 'ppapi_example_ime',
349       'dependencies': [
350         'ppapi_example_skeleton',
351         'ppapi.gyp:ppapi_cpp',
352       ],
353       'sources': [
354         'examples/ime/ime.cc',
355       ],
356     },
357     {
358       # GN version: //ppapi/examples/2d:paint_manager
359       'target_name': 'ppapi_example_paint_manager',
360       'dependencies': [
361         'ppapi_example_skeleton',
362         'ppapi.gyp:ppapi_cpp',
363       ],
364       'sources': [
365         'examples/2d/paint_manager_example.cc',
366       ],
367     },
368     {
369       # GN version: //ppapi/examples/input
370       'target_name': 'ppapi_example_input',
371       'dependencies': [
372         'ppapi_example_skeleton',
373         'ppapi.gyp:ppapi_cpp',
374       ],
375       'sources': [
376         'examples/input/pointer_event_input.cc',
377       ],
378     },
379     {
380       # GN version: //ppapi/examples/scripting
381       'target_name': 'ppapi_example_post_message',
382       'dependencies': [
383         'ppapi_example_skeleton',
384         'ppapi.gyp:ppapi_cpp',
385       ],
386       'sources': [
387         'examples/scripting/post_message.cc',
388       ],
389     },
390     {
391       # GN version: //ppapi/examples/scaling
392       'target_name': 'ppapi_example_scaling',
393       'dependencies': [
394         'ppapi_example_skeleton',
395         'ppapi.gyp:ppapi_cpp',
396       ],
397       'sources': [
398         'examples/scaling/scaling.cc',
399       ],
400     },
401     {
402       # GN version: //ppapi/examples/2d:scroll
403       'target_name': 'ppapi_example_scroll',
404       'dependencies': [
405         'ppapi_example_skeleton',
406         'ppapi.gyp:ppapi_cpp',
407       ],
408       'sources': [
409         'examples/2d/scroll.cc',
410       ],
411     },
412     {
413       # GN version: //ppapi/examples/font
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       # GN version: //ppapi/examples/threading
425       'target_name': 'ppapi_example_threading',
426       'dependencies': [
427         'ppapi_example_skeleton',
428         'ppapi.gyp:ppapi_cpp',
429       ],
430       'sources': [
431         'examples/threading/threading.cc',
432       ],
433     },
434     {
435       # GN version: //ppapi/examples/url_loader:streaming
436       'target_name': 'ppapi_example_url_loader',
437       'dependencies': [
438         'ppapi_example_skeleton',
439         'ppapi.gyp:ppapi_cpp',
440       ],
441       'sources': [
442         'examples/url_loader/streaming.cc',
443       ],
444     },
445     {
446       # GN version: //ppapi/examples/url_loader:file
447       'target_name': 'ppapi_example_url_loader_file',
448       'dependencies': [
449         'ppapi_example_skeleton',
450         'ppapi.gyp:ppapi_cpp',
451       ],
452       'sources': [
453         'examples/url_loader/stream_to_file.cc',
454       ],
455     },
456     {
457       # GN version: //ppapi/examples/gles2
458       'target_name': 'ppapi_example_gles2',
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/gles2/gles2.cc',
469       ],
470     },
471     {
472       # GN version: //ppapi/examples/video_decode:stable
473       'target_name': 'ppapi_example_video_decode',
474       'dependencies': [
475         'ppapi_example_skeleton',
476         'ppapi.gyp:ppapi_cpp',
477         'ppapi.gyp:ppapi_gles2',
478       ],
479       'include_dirs': [
480         'lib/gl/include',
481       ],
482       'sources': [
483         'examples/video_decode/testdata.h',
484         'examples/video_decode/video_decode.cc',
485       ],
486     },
487     {
488       # GN version: //ppapi/examples/video_decode:dev
489       'target_name': 'ppapi_example_video_decode_dev',
490       'dependencies': [
491         'ppapi_example_skeleton',
492         'ppapi.gyp:ppapi_cpp',
493         'ppapi.gyp:ppapi_gles2',
494       ],
495       'include_dirs': [
496         'lib/gl/include',
497       ],
498       'sources': [
499         'examples/video_decode/testdata.h',
500         'examples/video_decode/video_decode_dev.cc',
501       ],
502     },
503     {
504       'target_name': 'ppapi_example_video_encode',
505       'dependencies': [
506         'ppapi_example_skeleton',
507         'ppapi.gyp:ppapi_cpp',
508       ],
509       'sources': [
510         'examples/video_encode/video_encode.cc',
511       ],
512     },
513     {
514       # GN version: //ppapi/example/video_capture
515       'target_name': 'ppapi_example_vc',
516       'dependencies': [
517         'ppapi_example_skeleton',
518         'ppapi.gyp:ppapi_cpp',
519         'ppapi.gyp:ppapi_gles2',
520       ],
521       'include_dirs': [
522         'lib/gl/include',
523       ],
524       'sources': [
525         'examples/video_capture/video_capture.cc',
526       ],
527     },
528     {
529       # GN version: //ppapi/examples/video_effects
530       'target_name': 'ppapi_example_video_effects',
531       'dependencies': [
532         'ppapi_example_skeleton',
533         'ppapi.gyp:ppapi_cpp',
534       ],
535       'sources': [
536         'examples/video_effects/video_effects.cc',
537       ],
538     },
539     {
540       # GN version: //ppapi/examples/enumerate_devices
541       'target_name': 'ppapi_example_enumerate_devices',
542       'dependencies': [
543         'ppapi_example_skeleton',
544         'ppapi.gyp:ppapi_cpp',
545       ],
546       'sources': [
547         'examples/enumerate_devices/enumerate_devices.cc',
548       ],
549     },
550     {
551       # GN version: //ppapi/examples/flash_topmost
552       'target_name': 'ppapi_example_flash_topmost',
553       'dependencies': [
554         'ppapi_example_skeleton',
555         'ppapi.gyp:ppapi_cpp',
556       ],
557       'sources': [
558         'examples/flash_topmost/flash_topmost.cc',
559       ],
560     },
561     {
562       # GN version: //ppapi/examples/printing
563       'target_name': 'ppapi_example_printing',
564       'dependencies': [
565         'ppapi_example_skeleton',
566         'ppapi.gyp:ppapi_cpp',
567       ],
568       'sources': [
569         'examples/printing/printing.cc',
570       ],
571     },
572     {
573       # GN version: //ppapi/examples/media_stream_audio
574       'target_name': 'ppapi_example_media_stream_audio',
575       'dependencies': [
576         'ppapi_example_skeleton',
577         'ppapi.gyp:ppapi_cpp',
578       ],
579       'sources': [
580         'examples/media_stream_audio/media_stream_audio.cc',
581       ],
582     },
583     {
584       # GN version: //ppapi/examples/media_stream_video
585       'target_name': 'ppapi_example_media_stream_video',
586       'dependencies': [
587         'ppapi_example_skeleton',
588         'ppapi.gyp:ppapi_cpp',
589         'ppapi.gyp:ppapi_gles2',
590       ],
591       'include_dirs': [
592         'lib/gl/include',
593       ],
594       'sources': [
595         'examples/media_stream_video/media_stream_video.cc',
596       ],
597     },
598     {
599       # GN version: //ppapi/examples/gles2_spinning_cube
600       'target_name': 'ppapi_example_gles2_spinning_cube',
601       'dependencies': [
602         'ppapi_example_skeleton',
603         'ppapi.gyp:ppapi_cpp',
604         'ppapi.gyp:ppapi_gles2',
605       ],
606       'include_dirs': [
607         'lib/gl/include',
608       ],
609       'sources': [
610         'examples/gles2_spinning_cube/gles2_spinning_cube.cc',
611         'examples/gles2_spinning_cube/spinning_cube.cc',
612         'examples/gles2_spinning_cube/spinning_cube.h',
613       ],
614     },
615     {
616       # GN version: //ppapi/examples/compositor
617       'target_name': 'ppapi_example_compositor',
618       'dependencies': [
619         'ppapi_example_skeleton',
620         'ppapi.gyp:ppapi_cpp',
621         'ppapi.gyp:ppapi_gles2',
622       ],
623       'include_dirs': [
624         'lib/gl/include',
625       ],
626       'sources': [
627         'examples/compositor/compositor.cc',
628         'examples/compositor/spinning_cube.cc',
629         'examples/compositor/spinning_cube.h',
630       ],
631     },
632     # Adding a new PPAPI example? Don't forget to update the GN build.
633     # See //ppapi/examples/BUILD.gn
634   ],