platformKeys: Add per-extension sign permissions.
[chromium-blink-merge.git] / ppapi / ppapi_tests.gypi
blob0e5de1693e4a693a65924d8c5732bb4816718a84
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         }],
59         ['OS=="mac"', {
60           'mac_bundle': 1,
61           'product_name': 'ppapi_tests',
62           'product_extension': 'plugin',
63         }],
64       ],
65 # TODO(dmichael):  Figure out what is wrong with the script on Windows and add
66 #                  it as an automated action.
67 #      'actions': [
68 #        {
69 #          'action_name': 'generate_ppapi_include_tests',
70 #          'inputs': [],
71 #          'outputs': [
72 #            'tests/test_c_includes.c',
73 #            'tests/test_cc_includes.cc',
74 #          ],
75 #          'action': [
76 #            '<!@(python generate_ppapi_include_tests.py)',
77 #          ],
78 #        },
79 #      ],
80     },
81     {
82       # GN version: //ppapi/proxy:test_support
83       #             //ppapi/shared_impl:test_support
84       'target_name': 'ppapi_unittest_shared',
85       'type': 'static_library',
86       'dependencies': [
87         'ppapi_proxy',
88         'ppapi_shared',
89         '../base/base.gyp:test_support_base',
90         '../ipc/ipc.gyp:ipc',
91         '../ipc/ipc.gyp:test_support_ipc',
92         '../testing/gmock.gyp:gmock',
93         '../testing/gtest.gyp:gtest',
94       ],
95       'sources': [
96         # Note: sources list duplicated in GN build.
97         'proxy/ppapi_proxy_test.cc',
98         'proxy/ppapi_proxy_test.h',
99         'proxy/resource_message_test_sink.cc',
100         'proxy/resource_message_test_sink.h',
101         'shared_impl/test_globals.cc',
102         'shared_impl/test_globals.h',
103         'shared_impl/unittest_utils.cc',
104         'shared_impl/unittest_utils.h',
105       ],
106     },
108     {
109       'target_name': 'ppapi_perftests',
110       'type': 'executable',
111       'variables': {
112         'chromium_code': 1,
113       },
114       'dependencies': [
115         'ppapi_proxy',
116         'ppapi_shared',
117         'ppapi_unittest_shared',
118         '../base/base.gyp:test_support_base',
119         '../testing/gtest.gyp:gtest',
120       ],
121       'sources': [
122         'proxy/ppapi_perftests.cc',
123         'proxy/ppp_messaging_proxy_perftest.cc',
124       ],
125       'conditions': [
126         # See http://crbug.com/162998#c4 for why this is needed.
127         ['OS=="linux" and use_allocator!="none"', {
128           'dependencies': [
129             '../base/allocator/allocator.gyp:allocator',
130           ],
131         }],
132       ],
133     },
134     {
135       'target_name': 'ppapi_unittests',
136       'type': 'executable',
137       'variables': {
138         'chromium_code': 1,
139       },
140       'dependencies': [
141         'ppapi_host',
142         'ppapi_proxy',
143         'ppapi_shared',
144         'ppapi_unittest_shared',
145         '../base/base.gyp:run_all_unittests',
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       'sources': [
156         'host/resource_message_filter_unittest.cc',
157         'proxy/device_enumeration_resource_helper_unittest.cc',
158         'proxy/file_chooser_resource_unittest.cc',
159         'proxy/file_system_resource_unittest.cc',
160         'proxy/flash_resource_unittest.cc',
161         'proxy/interface_list_unittest.cc',
162         'proxy/mock_resource.cc',
163         'proxy/mock_resource.h',
164         'proxy/nacl_message_scanner_unittest.cc',
165         'proxy/pdf_resource_unittest.cc',
166         'proxy/plugin_dispatcher_unittest.cc',
167         'proxy/plugin_resource_tracker_unittest.cc',
168         'proxy/plugin_var_tracker_unittest.cc',
169         'proxy/ppb_var_unittest.cc',
170         'proxy/ppp_instance_private_proxy_unittest.cc',
171         'proxy/ppp_instance_proxy_unittest.cc',
172         'proxy/ppp_messaging_proxy_unittest.cc',
173         'proxy/printing_resource_unittest.cc',
174         'proxy/raw_var_data_unittest.cc',
175         'proxy/serialized_var_unittest.cc',
176         'proxy/talk_resource_unittest.cc',
177         'proxy/video_decoder_resource_unittest.cc',
178         'proxy/websocket_resource_unittest.cc',
179         'shared_impl/media_stream_audio_track_shared_unittest.cc',
180         'shared_impl/media_stream_buffer_manager_unittest.cc',
181         'shared_impl/media_stream_video_track_shared_unittest.cc',
182         'shared_impl/proxy_lock_unittest.cc',
183         'shared_impl/resource_tracker_unittest.cc',
184         'shared_impl/thread_aware_callback_unittest.cc',
185         'shared_impl/time_conversion_unittest.cc',
186         'shared_impl/tracked_callback_unittest.cc',
187         'shared_impl/var_tracker_unittest.cc',
188       ],
189       'conditions': [
190         [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
191           'conditions': [
192             [ 'use_allocator!="none"', {
193               'dependencies': [
194                 '../base/allocator/allocator.gyp:allocator',
195               ],
196             }],
197           ],
198         }],
199       ],
200     },
201     {
202       'target_name': 'ppapi_example_skeleton',
203       'suppress_wildcard': 1,
204       'type': 'none',
205       'direct_dependent_settings': {
206         'product_name': '>(_target_name)',
207         'conditions': [
208           ['os_posix==1 and OS!="mac"', {
209             'cflags': ['-fvisibility=hidden'],
210             'type': 'shared_library',
211           }],
212           ['OS=="win"', {
213             'type': 'shared_library',
214           }],
215           ['OS=="mac"', {
216             'type': 'loadable_module',
217             'mac_bundle': 1,
218             'product_extension': 'plugin',
219             'xcode_settings': {
220               'OTHER_LDFLAGS': [
221                 # Not to strip important symbols by -Wl,-dead_strip.
222                 '-Wl,-exported_symbol,_PPP_GetInterface',
223                 '-Wl,-exported_symbol,_PPP_InitializeModule',
224                 '-Wl,-exported_symbol,_PPP_ShutdownModule'
225               ]},
226           }],
227         ],
228       },
229     },
230     {
231       # GN version: //ppapi/examples/mouse_cursor
232       'target_name': 'ppapi_example_mouse_cursor',
233       'dependencies': [
234         'ppapi_example_skeleton',
235         'ppapi.gyp:ppapi_cpp',
236       ],
237       'sources': [
238         'examples/mouse_cursor/mouse_cursor.cc',
239       ],
240     },
241     {
242       # GN version: //ppapi/examples/mouse_lock
243       'target_name': 'ppapi_example_mouse_lock',
244       'dependencies': [
245         'ppapi_example_skeleton',
246         'ppapi.gyp:ppapi_cpp',
247       ],
248       'sources': [
249         'examples/mouse_lock/mouse_lock.cc',
250       ],
251     },
253     {
254       # GN version: //ppapi/examples/gamepad
255       'target_name': 'ppapi_example_gamepad',
256       'dependencies': [
257         'ppapi_example_skeleton',
258         'ppapi.gyp:ppapi_cpp',
259       ],
260       'sources': [
261         'examples/gamepad/gamepad.cc',
262       ],
263     },
265     {
266       # GN version: //ppapi/examples/stub:c_stub
267       'target_name': 'ppapi_example_c_stub',
268       'dependencies': [
269         'ppapi_example_skeleton',
270         'ppapi.gyp:ppapi_c',
271       ],
272       'sources': [
273         'examples/stub/stub.c',
274       ],
275     },
276     {
277       # GN version: //ppapi/examples/stub:cc_stub
278       'target_name': 'ppapi_example_cc_stub',
279       'dependencies': [
280         'ppapi_example_skeleton',
281         'ppapi.gyp:ppapi_cpp',
282       ],
283       'sources': [
284         'examples/stub/stub.cc',
285       ],
286     },
287     {
288       # GN version: //ppapi/examples/crxfs
289       'target_name': 'ppapi_example_crxfs',
290       'dependencies': [
291         'ppapi_example_skeleton',
292         'ppapi.gyp:ppapi_cpp',
293       ],
294       'sources': [
295         'examples/crxfs/crxfs.cc',
296       ],
297     },
298     {
299       # GN version: //ppapi/examples/audio
300       'target_name': 'ppapi_example_audio',
301       'dependencies': [
302         'ppapi_example_skeleton',
303         'ppapi.gyp:ppapi_cpp',
304       ],
305       'sources': [
306         'examples/audio/audio.cc',
307       ],
308     },
309     {
310       # GN version: //ppapi/examples/audio_input
311       'target_name': 'ppapi_example_audio_input',
312       'dependencies': [
313         'ppapi_example_skeleton',
314         'ppapi.gyp:ppapi_cpp',
315       ],
316       'sources': [
317         'examples/audio_input/audio_input.cc',
318       ],
319     },
320     {
321       # GN version: //ppapi/examples/file_chooser
322       'target_name': 'ppapi_example_file_chooser',
323       'dependencies': [
324         'ppapi_example_skeleton',
325         'ppapi.gyp:ppapi_cpp',
326       ],
327       'sources': [
328         'examples/file_chooser/file_chooser.cc',
329       ],
330     },
331     {
332       # GN version: //ppapi/examples/2d:graphics_2d
333       'target_name': 'ppapi_example_graphics_2d',
334       'dependencies': [
335         'ppapi_example_skeleton',
336         'ppapi.gyp:ppapi_c',
337       ],
338       'sources': [
339         'examples/2d/graphics_2d_example.c',
340       ],
341     },
342     {
343       # GN version: //ppapi/examples/ime
344       'target_name': 'ppapi_example_ime',
345       'dependencies': [
346         'ppapi_example_skeleton',
347         'ppapi.gyp:ppapi_cpp',
348       ],
349       'sources': [
350         'examples/ime/ime.cc',
351       ],
352     },
353     {
354       # GN version: //ppapi/examples/2d:paint_manager
355       'target_name': 'ppapi_example_paint_manager',
356       'dependencies': [
357         'ppapi_example_skeleton',
358         'ppapi.gyp:ppapi_cpp',
359       ],
360       'sources': [
361         'examples/2d/paint_manager_example.cc',
362       ],
363     },
364     {
365       # GN version: //ppapi/examples/input
366       'target_name': 'ppapi_example_input',
367       'dependencies': [
368         'ppapi_example_skeleton',
369         'ppapi.gyp:ppapi_cpp',
370       ],
371       'sources': [
372         'examples/input/pointer_event_input.cc',
373       ],
374     },
375     {
376       # GN version: //ppapi/examples/scripting
377       'target_name': 'ppapi_example_post_message',
378       'dependencies': [
379         'ppapi_example_skeleton',
380         'ppapi.gyp:ppapi_cpp',
381       ],
382       'sources': [
383         'examples/scripting/post_message.cc',
384       ],
385     },
386     {
387       # GN version: //ppapi/examples/scaling
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       # GN version: //ppapi/examples/2d:scroll
399       'target_name': 'ppapi_example_scroll',
400       'dependencies': [
401         'ppapi_example_skeleton',
402         'ppapi.gyp:ppapi_cpp',
403       ],
404       'sources': [
405         'examples/2d/scroll.cc',
406       ],
407     },
408     {
409       # GN version: //ppapi/examples/font
410       'target_name': 'ppapi_example_simple_font',
411       'dependencies': [
412         'ppapi_example_skeleton',
413         'ppapi.gyp:ppapi_cpp',
414       ],
415       'sources': [
416         'examples/font/simple_font.cc',
417       ],
418     },
419     {
420       # GN version: //ppapi/examples/threading
421       'target_name': 'ppapi_example_threading',
422       'dependencies': [
423         'ppapi_example_skeleton',
424         'ppapi.gyp:ppapi_cpp',
425       ],
426       'sources': [
427         'examples/threading/threading.cc',
428       ],
429     },
430     {
431       # GN version: //ppapi/examples/url_loader:streaming
432       'target_name': 'ppapi_example_url_loader',
433       'dependencies': [
434         'ppapi_example_skeleton',
435         'ppapi.gyp:ppapi_cpp',
436       ],
437       'sources': [
438         'examples/url_loader/streaming.cc',
439       ],
440     },
441     {
442       # GN version: //ppapi/examples/url_loader:file
443       'target_name': 'ppapi_example_url_loader_file',
444       'dependencies': [
445         'ppapi_example_skeleton',
446         'ppapi.gyp:ppapi_cpp',
447       ],
448       'sources': [
449         'examples/url_loader/stream_to_file.cc',
450       ],
451     },
452     {
453       # GN version: //ppapi/examples/gles2
454       'target_name': 'ppapi_example_gles2',
455       'dependencies': [
456         'ppapi_example_skeleton',
457         'ppapi.gyp:ppapi_cpp',
458         'ppapi.gyp:ppapi_gles2',
459       ],
460       'include_dirs': [
461         'lib/gl/include',
462       ],
463       'sources': [
464         'examples/gles2/gles2.cc',
465       ],
466     },
467     {
468       # GN version: //ppapi/examples/video_decode:stable
469       'target_name': 'ppapi_example_video_decode',
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_decode/testdata.h',
480         'examples/video_decode/video_decode.cc',
481       ],
482     },
483     {
484       # GN version: //ppapi/examples/video_decode:dev
485       'target_name': 'ppapi_example_video_decode_dev',
486       'dependencies': [
487         'ppapi_example_skeleton',
488         'ppapi.gyp:ppapi_cpp',
489         'ppapi.gyp:ppapi_gles2',
490       ],
491       'include_dirs': [
492         'lib/gl/include',
493       ],
494       'sources': [
495         'examples/video_decode/testdata.h',
496         'examples/video_decode/video_decode_dev.cc',
497       ],
498     },
499     {
500       # GN version: //ppapi/example/video_capture
501       'target_name': 'ppapi_example_vc',
502       'dependencies': [
503         'ppapi_example_skeleton',
504         'ppapi.gyp:ppapi_cpp',
505         'ppapi.gyp:ppapi_gles2',
506       ],
507       'include_dirs': [
508         'lib/gl/include',
509       ],
510       'sources': [
511         'examples/video_capture/video_capture.cc',
512       ],
513     },
514     {
515       # GN version: //ppapi/examples/video_effects
516       'target_name': 'ppapi_example_video_effects',
517       'dependencies': [
518         'ppapi_example_skeleton',
519         'ppapi.gyp:ppapi_cpp',
520       ],
521       'sources': [
522         'examples/video_effects/video_effects.cc',
523       ],
524     },
525     {
526       # GN version: //ppapi/examples/enumerate_devices
527       'target_name': 'ppapi_example_enumerate_devices',
528       'dependencies': [
529         'ppapi_example_skeleton',
530         'ppapi.gyp:ppapi_cpp',
531       ],
532       'sources': [
533         'examples/enumerate_devices/enumerate_devices.cc',
534       ],
535     },
536     {
537       # GN version: //ppapi/examples/flash_topmost
538       'target_name': 'ppapi_example_flash_topmost',
539       'dependencies': [
540         'ppapi_example_skeleton',
541         'ppapi.gyp:ppapi_cpp',
542       ],
543       'sources': [
544         'examples/flash_topmost/flash_topmost.cc',
545       ],
546     },
547     {
548       # GN version: //ppapi/examples/printing
549       'target_name': 'ppapi_example_printing',
550       'dependencies': [
551         'ppapi_example_skeleton',
552         'ppapi.gyp:ppapi_cpp',
553       ],
554       'sources': [
555         'examples/printing/printing.cc',
556       ],
557     },
558     {
559       # GN version: //ppapi/examples/media_stream_audio
560       'target_name': 'ppapi_example_media_stream_audio',
561       'dependencies': [
562         'ppapi_example_skeleton',
563         'ppapi.gyp:ppapi_cpp',
564       ],
565       'sources': [
566         'examples/media_stream_audio/media_stream_audio.cc',
567       ],
568     },
569     {
570       # GN version: //ppapi/examples/media_stream_video
571       'target_name': 'ppapi_example_media_stream_video',
572       'dependencies': [
573         'ppapi_example_skeleton',
574         'ppapi.gyp:ppapi_cpp',
575         'ppapi.gyp:ppapi_gles2',
576       ],
577       'include_dirs': [
578         'lib/gl/include',
579       ],
580       'sources': [
581         'examples/media_stream_video/media_stream_video.cc',
582       ],
583     },
584     {
585       # GN version: //ppapi/examples/gles2_spinning_cube
586       'target_name': 'ppapi_example_gles2_spinning_cube',
587       'dependencies': [
588         'ppapi_example_skeleton',
589         'ppapi.gyp:ppapi_cpp',
590         'ppapi.gyp:ppapi_gles2',
591       ],
592       'include_dirs': [
593         'lib/gl/include',
594       ],
595       'sources': [
596         'examples/gles2_spinning_cube/gles2_spinning_cube.cc',
597         'examples/gles2_spinning_cube/spinning_cube.cc',
598         'examples/gles2_spinning_cube/spinning_cube.h',
599       ],
600     },
601     {
602       # GN version: //ppapi/examples/compositor
603       'target_name': 'ppapi_example_compositor',
604       'dependencies': [
605         'ppapi_example_skeleton',
606         'ppapi.gyp:ppapi_cpp',
607         'ppapi.gyp:ppapi_gles2',
608       ],
609       'include_dirs': [
610         'lib/gl/include',
611       ],
612       'sources': [
613         'examples/compositor/compositor.cc',
614         'examples/compositor/spinning_cube.cc',
615         'examples/compositor/spinning_cube.h',
616       ],
617     },
618     # Adding a new PPAPI example? Don't forget to update the GN build.
619     # See //ppapi/examples/BUILD.gn
620   ],