Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / ppapi / ppapi_tests.gypi
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.
4
5 {
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     },
108
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:run_all_unittests',
147         '../base/base.gyp:test_support_base',
148         '../gpu/gpu.gyp:gpu_ipc',
149         '../ipc/ipc.gyp:ipc',
150         '../ipc/ipc.gyp:test_support_ipc',
151         '../media/media.gyp:shared_memory_support',
152         '../testing/gmock.gyp:gmock',
153         '../testing/gtest.gyp:gtest',
154         '../ui/surface/surface.gyp:surface',
155       ],
156       # For the nacl_http_response_headers_unittest below.
157       'include_dirs': [
158         '../ppapi',
159       ],
160       'sources': [
161         'host/resource_message_filter_unittest.cc',
162         # Piggy back on ppapi_unittests for a simple NaCl unittest,
163         # which must not have dependencies on anything other than stdlibs.
164         # We add the source file, not just the test to ensure that the object
165         # is built.  Otherwise, we would need to depend on the NaCl trusted
166         # plugin being built to build the object.
167         # TODO(jvoung): move this to unit_tests instead of ppapi_unittests
168         # once this moves into chrome.
169         'native_client/src/trusted/plugin/nacl_http_response_headers.cc',
170         'native_client/src/trusted/plugin/nacl_http_response_headers_unittest.cc',
171         'proxy/device_enumeration_resource_helper_unittest.cc',
172         'proxy/file_chooser_resource_unittest.cc',
173         'proxy/file_system_resource_unittest.cc',
174         'proxy/flash_resource_unittest.cc',
175         'proxy/interface_list_unittest.cc',
176         'proxy/mock_resource.cc',
177         'proxy/mock_resource.h',
178         'proxy/nacl_message_scanner_unittest.cc',
179         'proxy/pdf_resource_unittest.cc',
180         'proxy/plugin_dispatcher_unittest.cc',
181         'proxy/plugin_resource_tracker_unittest.cc',
182         'proxy/plugin_var_tracker_unittest.cc',
183         'proxy/ppb_var_unittest.cc',
184         'proxy/ppp_instance_private_proxy_unittest.cc',
185         'proxy/ppp_instance_proxy_unittest.cc',
186         'proxy/ppp_messaging_proxy_unittest.cc',
187         'proxy/printing_resource_unittest.cc',
188         'proxy/raw_var_data_unittest.cc',
189         'proxy/serialized_var_unittest.cc',
190         'proxy/talk_resource_unittest.cc',
191         'proxy/websocket_resource_unittest.cc',
192         'shared_impl/proxy_lock_unittest.cc',
193         'shared_impl/resource_tracker_unittest.cc',
194         'shared_impl/thread_aware_callback_unittest.cc',
195         'shared_impl/time_conversion_unittest.cc',
196         'shared_impl/tracked_callback_unittest.cc',
197         'shared_impl/var_tracker_unittest.cc',
198         'shared_impl/var_value_conversions_unittest.cc',
199       ],
200       'conditions': [
201         [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
202           'conditions': [
203             [ 'linux_use_tcmalloc == 1', {
204               'dependencies': [
205                 '../base/allocator/allocator.gyp:allocator',
206               ],
207             }],
208           ],
209         }],
210       ],
211       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
212       'msvs_disabled_warnings': [ 4267, ],
213     },
214     {
215       'target_name': 'ppapi_example_skeleton',
216       'suppress_wildcard': 1,
217       'type': 'none',
218       'direct_dependent_settings': {
219         'product_name': '>(_target_name)',
220         'conditions': [
221           ['os_posix==1 and OS!="mac"', {
222             'cflags': ['-fvisibility=hidden'],
223             'type': 'shared_library',
224           }],
225           ['OS=="win"', {
226             'type': 'shared_library',
227           }],
228           ['OS=="mac"', {
229             'type': 'loadable_module',
230             'mac_bundle': 1,
231             'product_extension': 'plugin',
232             'xcode_settings': {
233               'OTHER_LDFLAGS': [
234                 # Not to strip important symbols by -Wl,-dead_strip.
235                 '-Wl,-exported_symbol,_PPP_GetInterface',
236                 '-Wl,-exported_symbol,_PPP_InitializeModule',
237                 '-Wl,-exported_symbol,_PPP_ShutdownModule'
238               ]},
239           }],
240         ],
241       },
242     },
243     {
244       'target_name': 'ppapi_example_mouse_cursor',
245       'dependencies': [
246         'ppapi_example_skeleton',
247         'ppapi.gyp:ppapi_cpp',
248       ],
249       'sources': [
250         'examples/mouse_cursor/mouse_cursor.cc',
251       ],
252     },
253     {
254       'target_name': 'ppapi_example_mouse_lock',
255       'dependencies': [
256         'ppapi_example_skeleton',
257         'ppapi.gyp:ppapi_cpp',
258       ],
259       'sources': [
260         'examples/mouse_lock/mouse_lock.cc',
261       ],
262     },
263
264     {
265       'target_name': 'ppapi_example_gamepad',
266       'dependencies': [
267         'ppapi_example_skeleton',
268         'ppapi.gyp:ppapi_cpp',
269       ],
270       'sources': [
271         'examples/gamepad/gamepad.cc',
272       ],
273       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
274       'msvs_disabled_warnings': [ 4267, ],
275     },
276
277     {
278       'target_name': 'ppapi_example_c_stub',
279       'dependencies': [
280         'ppapi_example_skeleton',
281         'ppapi.gyp:ppapi_c',
282       ],
283       'sources': [
284         'examples/stub/stub.c',
285       ],
286     },
287     {
288       'target_name': 'ppapi_example_cc_stub',
289       'dependencies': [
290         'ppapi_example_skeleton',
291         'ppapi.gyp:ppapi_cpp',
292       ],
293       'sources': [
294         'examples/stub/stub.cc',
295       ],
296     },
297     {
298       'target_name': 'ppapi_example_crxfs',
299       'dependencies': [
300         'ppapi_example_skeleton',
301         'ppapi.gyp:ppapi_cpp',
302       ],
303       'sources': [
304         'examples/crxfs/crxfs.cc',
305       ],
306     },
307     {
308       'target_name': 'ppapi_example_audio',
309       'dependencies': [
310         'ppapi_example_skeleton',
311         'ppapi.gyp:ppapi_cpp',
312       ],
313       'sources': [
314         'examples/audio/audio.cc',
315       ],
316     },
317     {
318       'target_name': 'ppapi_example_audio_input',
319       'dependencies': [
320         'ppapi_example_skeleton',
321         'ppapi.gyp:ppapi_cpp',
322       ],
323       'sources': [
324         'examples/audio_input/audio_input.cc',
325       ],
326     },
327     {
328       'target_name': 'ppapi_example_file_chooser',
329       'dependencies': [
330         'ppapi_example_skeleton',
331         'ppapi.gyp:ppapi_cpp',
332       ],
333       'sources': [
334         'examples/file_chooser/file_chooser.cc',
335       ],
336     },
337     {
338       'target_name': 'ppapi_example_graphics_2d',
339       'dependencies': [
340         'ppapi_example_skeleton',
341         'ppapi.gyp:ppapi_c',
342       ],
343       'sources': [
344         'examples/2d/graphics_2d_example.c',
345       ],
346     },
347     {
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       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
357       'msvs_disabled_warnings': [ 4267, ],
358     },
359     {
360       'target_name': 'ppapi_example_paint_manager',
361       'dependencies': [
362         'ppapi_example_skeleton',
363         'ppapi.gyp:ppapi_cpp',
364       ],
365       'sources': [
366         'examples/2d/paint_manager_example.cc',
367       ],
368     },
369     {
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       'target_name': 'ppapi_example_post_message',
381       'dependencies': [
382         'ppapi_example_skeleton',
383         'ppapi.gyp:ppapi_cpp',
384       ],
385       'sources': [
386         'examples/scripting/post_message.cc',
387       ],
388     },
389     {
390       'target_name': 'ppapi_example_scaling',
391       'dependencies': [
392         'ppapi_example_skeleton',
393         'ppapi.gyp:ppapi_cpp',
394       ],
395       'sources': [
396         'examples/scaling/scaling.cc',
397       ],
398     },
399     {
400       'target_name': 'ppapi_example_scroll',
401       'dependencies': [
402         'ppapi_example_skeleton',
403         'ppapi.gyp:ppapi_cpp',
404       ],
405       'sources': [
406         'examples/2d/scroll.cc',
407       ],
408     },
409     {
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       'target_name': 'ppapi_example_url_loader',
421       'dependencies': [
422         'ppapi_example_skeleton',
423         'ppapi.gyp:ppapi_cpp',
424       ],
425       'sources': [
426         'examples/url_loader/streaming.cc',
427       ],
428     },
429     {
430       'target_name': 'ppapi_example_url_loader_file',
431       'dependencies': [
432         'ppapi_example_skeleton',
433         'ppapi.gyp:ppapi_cpp',
434       ],
435       'sources': [
436         'examples/url_loader/stream_to_file.cc',
437       ],
438     },
439     {
440       'target_name': 'ppapi_example_gles2',
441       'dependencies': [
442         'ppapi_example_skeleton',
443         'ppapi.gyp:ppapi_cpp',
444         'ppapi.gyp:ppapi_gles2',
445       ],
446       'include_dirs': [
447         'lib/gl/include',
448       ],
449       'sources': [
450         'examples/gles2/gles2.cc',
451       ],
452     },
453     {
454       'target_name': 'ppapi_example_video_decode',
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/video_decode/video_decode.cc',
465         'examples/video_decode/testdata.h',
466       ],
467       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
468       'msvs_disabled_warnings': [ 4267, ],
469     },
470     {
471       'target_name': 'ppapi_example_vc',
472       'dependencies': [
473         'ppapi_example_skeleton',
474         'ppapi.gyp:ppapi_cpp',
475         'ppapi.gyp:ppapi_gles2',
476       ],
477       'include_dirs': [
478         'lib/gl/include',
479       ],
480       'sources': [
481         'examples/video_capture/video_capture.cc',
482       ],
483     },
484     {
485       'target_name': 'ppapi_example_video_effects',
486       'dependencies': [
487         'ppapi_example_skeleton',
488         'ppapi.gyp:ppapi_cpp',
489       ],
490       'sources': [
491         'examples/video_effects/video_effects.cc',
492       ],
493     },
494     {
495       'target_name': 'ppapi_example_enumerate_devices',
496       'dependencies': [
497         'ppapi_example_skeleton',
498         'ppapi.gyp:ppapi_cpp',
499       ],
500       'sources': [
501         'examples/enumerate_devices/enumerate_devices.cc',
502       ],
503     },
504     {
505       'target_name': 'ppapi_example_flash_topmost',
506       'dependencies': [
507         'ppapi_example_skeleton',
508         'ppapi.gyp:ppapi_cpp',
509       ],
510       'sources': [
511         'examples/flash_topmost/flash_topmost.cc',
512       ],
513     },
514     {
515       'target_name': 'ppapi_example_printing',
516       'dependencies': [
517         'ppapi_example_skeleton',
518         'ppapi.gyp:ppapi_cpp',
519       ],
520       'sources': [
521         'examples/printing/printing.cc',
522       ],
523       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
524       'msvs_disabled_warnings': [ 4267, ],
525     },
526     {
527       'target_name': 'ppapi_example_media_stream_audio',
528       'dependencies': [
529         'ppapi_example_skeleton',
530         'ppapi.gyp:ppapi_cpp',
531       ],
532       'sources': [
533         'examples/media_stream_audio/media_stream_audio.cc',
534       ],
535     },
536     {
537       'target_name': 'ppapi_example_media_stream_video',
538       'dependencies': [
539         'ppapi_example_skeleton',
540         'ppapi.gyp:ppapi_cpp',
541         'ppapi.gyp:ppapi_gles2',
542       ],
543       'include_dirs': [
544         'lib/gl/include',
545       ],
546       'sources': [
547         'examples/media_stream_video/media_stream_video.cc',
548       ],
549     },
550   ],
551 }