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