Upstream version 7.36.149.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             'tests/ppapi_nacl_tests_pnacl_nonsfi.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           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
60           'msvs_disabled_warnings': [ 4267, ],
61         }],
62         ['OS=="mac"', {
63           'mac_bundle': 1,
64           'product_name': 'ppapi_tests',
65           'product_extension': 'plugin',
66         }],
67       ],
68       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
69       'msvs_disabled_warnings': [ 4267, ],
70 # TODO(dmichael):  Figure out what is wrong with the script on Windows and add
71 #                  it as an automated action.
72 #      'actions': [
73 #        {
74 #          'action_name': 'generate_ppapi_include_tests',
75 #          'inputs': [],
76 #          'outputs': [
77 #            'tests/test_c_includes.c',
78 #            'tests/test_cc_includes.cc',
79 #          ],
80 #          'action': [
81 #            '<!@(python generate_ppapi_include_tests.py)',
82 #          ],
83 #        },
84 #      ],
85     },
86     {
87       'target_name': 'ppapi_unittest_shared',
88       'type': 'static_library',
89       'dependencies': [
90         'ppapi_proxy',
91         'ppapi_shared',
92         '../base/base.gyp:test_support_base',
93         '../ipc/ipc.gyp:ipc',
94         '../ipc/ipc.gyp:test_support_ipc',
95         '../testing/gmock.gyp:gmock',
96         '../testing/gtest.gyp:gtest',
97       ],
98       'sources': [
99         'proxy/ppapi_proxy_test.cc',
100         'proxy/ppapi_proxy_test.h',
101         'proxy/resource_message_test_sink.cc',
102         'proxy/resource_message_test_sink.h',
103         'shared_impl/test_globals.cc',
104         'shared_impl/test_globals.h',
105         'shared_impl/unittest_utils.cc',
106         'shared_impl/unittest_utils.h',
107       ],
108     },
109
110     {
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       '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       'sources': [
158         'host/resource_message_filter_unittest.cc',
159         'proxy/device_enumeration_resource_helper_unittest.cc',
160         'proxy/file_chooser_resource_unittest.cc',
161         'proxy/file_system_resource_unittest.cc',
162         'proxy/flash_resource_unittest.cc',
163         'proxy/interface_list_unittest.cc',
164         'proxy/mock_resource.cc',
165         'proxy/mock_resource.h',
166         'proxy/nacl_message_scanner_unittest.cc',
167         'proxy/pdf_resource_unittest.cc',
168         'proxy/plugin_dispatcher_unittest.cc',
169         'proxy/plugin_resource_tracker_unittest.cc',
170         'proxy/plugin_var_tracker_unittest.cc',
171         'proxy/ppb_var_unittest.cc',
172         'proxy/ppp_instance_private_proxy_unittest.cc',
173         'proxy/ppp_instance_proxy_unittest.cc',
174         'proxy/ppp_messaging_proxy_unittest.cc',
175         'proxy/printing_resource_unittest.cc',
176         'proxy/raw_var_data_unittest.cc',
177         'proxy/serialized_var_unittest.cc',
178         'proxy/talk_resource_unittest.cc',
179         'proxy/websocket_resource_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         'shared_impl/var_value_conversions_unittest.cc',
189       ],
190       'conditions': [
191         [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
192           'conditions': [
193             [ 'use_allocator!="none"', {
194               'dependencies': [
195                 '../base/allocator/allocator.gyp:allocator',
196               ],
197             }],
198           ],
199         }],
200       ],
201       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
202       'msvs_disabled_warnings': [ 4267, ],
203     },
204     {
205       'target_name': 'ppapi_example_skeleton',
206       'suppress_wildcard': 1,
207       'type': 'none',
208       'direct_dependent_settings': {
209         'product_name': '>(_target_name)',
210         'conditions': [
211           ['os_posix==1 and OS!="mac"', {
212             'cflags': ['-fvisibility=hidden'],
213             'type': 'shared_library',
214           }],
215           ['OS=="win"', {
216             'type': 'shared_library',
217           }],
218           ['OS=="mac"', {
219             'type': 'loadable_module',
220             'mac_bundle': 1,
221             'product_extension': 'plugin',
222             'xcode_settings': {
223               'OTHER_LDFLAGS': [
224                 # Not to strip important symbols by -Wl,-dead_strip.
225                 '-Wl,-exported_symbol,_PPP_GetInterface',
226                 '-Wl,-exported_symbol,_PPP_InitializeModule',
227                 '-Wl,-exported_symbol,_PPP_ShutdownModule'
228               ]},
229           }],
230         ],
231       },
232     },
233     {
234       'target_name': 'ppapi_example_mouse_cursor',
235       'dependencies': [
236         'ppapi_example_skeleton',
237         'ppapi.gyp:ppapi_cpp',
238       ],
239       'sources': [
240         'examples/mouse_cursor/mouse_cursor.cc',
241       ],
242     },
243     {
244       'target_name': 'ppapi_example_mouse_lock',
245       'dependencies': [
246         'ppapi_example_skeleton',
247         'ppapi.gyp:ppapi_cpp',
248       ],
249       'sources': [
250         'examples/mouse_lock/mouse_lock.cc',
251       ],
252     },
253
254     {
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       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
264       'msvs_disabled_warnings': [ 4267, ],
265     },
266
267     {
268       'target_name': 'ppapi_example_c_stub',
269       'dependencies': [
270         'ppapi_example_skeleton',
271         'ppapi.gyp:ppapi_c',
272       ],
273       'sources': [
274         'examples/stub/stub.c',
275       ],
276     },
277     {
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       'target_name': 'ppapi_example_crxfs',
289       'dependencies': [
290         'ppapi_example_skeleton',
291         'ppapi.gyp:ppapi_cpp',
292       ],
293       'sources': [
294         'examples/crxfs/crxfs.cc',
295       ],
296     },
297     {
298       'target_name': 'ppapi_example_audio',
299       'dependencies': [
300         'ppapi_example_skeleton',
301         'ppapi.gyp:ppapi_cpp',
302       ],
303       'sources': [
304         'examples/audio/audio.cc',
305       ],
306     },
307     {
308       'target_name': 'ppapi_example_audio_input',
309       'dependencies': [
310         'ppapi_example_skeleton',
311         'ppapi.gyp:ppapi_cpp',
312       ],
313       'sources': [
314         'examples/audio_input/audio_input.cc',
315       ],
316     },
317     {
318       'target_name': 'ppapi_example_file_chooser',
319       'dependencies': [
320         'ppapi_example_skeleton',
321         'ppapi.gyp:ppapi_cpp',
322       ],
323       'sources': [
324         'examples/file_chooser/file_chooser.cc',
325       ],
326     },
327     {
328       'target_name': 'ppapi_example_graphics_2d',
329       'dependencies': [
330         'ppapi_example_skeleton',
331         'ppapi.gyp:ppapi_c',
332       ],
333       'sources': [
334         'examples/2d/graphics_2d_example.c',
335       ],
336     },
337     {
338       'target_name': 'ppapi_example_ime',
339       'dependencies': [
340         'ppapi_example_skeleton',
341         'ppapi.gyp:ppapi_cpp',
342       ],
343       'sources': [
344         'examples/ime/ime.cc',
345       ],
346       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
347       'msvs_disabled_warnings': [ 4267, ],
348     },
349     {
350       'target_name': 'ppapi_example_paint_manager',
351       'dependencies': [
352         'ppapi_example_skeleton',
353         'ppapi.gyp:ppapi_cpp',
354       ],
355       'sources': [
356         'examples/2d/paint_manager_example.cc',
357       ],
358     },
359     {
360       'target_name': 'ppapi_example_input',
361       'dependencies': [
362         'ppapi_example_skeleton',
363         'ppapi.gyp:ppapi_cpp',
364       ],
365       'sources': [
366         'examples/input/pointer_event_input.cc',
367       ],
368     },
369     {
370       'target_name': 'ppapi_example_post_message',
371       'dependencies': [
372         'ppapi_example_skeleton',
373         'ppapi.gyp:ppapi_cpp',
374       ],
375       'sources': [
376         'examples/scripting/post_message.cc',
377       ],
378     },
379     {
380       'target_name': 'ppapi_example_scaling',
381       'dependencies': [
382         'ppapi_example_skeleton',
383         'ppapi.gyp:ppapi_cpp',
384       ],
385       'sources': [
386         'examples/scaling/scaling.cc',
387       ],
388     },
389     {
390       'target_name': 'ppapi_example_scroll',
391       'dependencies': [
392         'ppapi_example_skeleton',
393         'ppapi.gyp:ppapi_cpp',
394       ],
395       'sources': [
396         'examples/2d/scroll.cc',
397       ],
398     },
399     {
400       'target_name': 'ppapi_example_simple_font',
401       'dependencies': [
402         'ppapi_example_skeleton',
403         'ppapi.gyp:ppapi_cpp',
404       ],
405       'sources': [
406         'examples/font/simple_font.cc',
407       ],
408     },
409     {
410       'target_name': 'ppapi_example_url_loader',
411       'dependencies': [
412         'ppapi_example_skeleton',
413         'ppapi.gyp:ppapi_cpp',
414       ],
415       'sources': [
416         'examples/url_loader/streaming.cc',
417       ],
418     },
419     {
420       'target_name': 'ppapi_example_url_loader_file',
421       'dependencies': [
422         'ppapi_example_skeleton',
423         'ppapi.gyp:ppapi_cpp',
424       ],
425       'sources': [
426         'examples/url_loader/stream_to_file.cc',
427       ],
428     },
429     {
430       'target_name': 'ppapi_example_gles2',
431       'dependencies': [
432         'ppapi_example_skeleton',
433         'ppapi.gyp:ppapi_cpp',
434         'ppapi.gyp:ppapi_gles2',
435       ],
436       'include_dirs': [
437         'lib/gl/include',
438       ],
439       'sources': [
440         'examples/gles2/gles2.cc',
441       ],
442     },
443     {
444       'target_name': 'ppapi_example_video_decode',
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         # TODO(bbudge) Change to new example when implementation lands.
455         'examples/video_decode/video_decode_dev.cc',
456         'examples/video_decode/testdata.h',
457       ],
458       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
459       'msvs_disabled_warnings': [ 4267, ],
460     },
461     {
462       'target_name': 'ppapi_example_video_decode_dev',
463       'dependencies': [
464         'ppapi_example_skeleton',
465         'ppapi.gyp:ppapi_cpp',
466         'ppapi.gyp:ppapi_gles2',
467       ],
468       'include_dirs': [
469         'lib/gl/include',
470       ],
471       'sources': [
472         'examples/video_decode/video_decode_dev.cc',
473         'examples/video_decode/testdata.h',
474       ],
475       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
476       'msvs_disabled_warnings': [ 4267, ],
477     },
478     {
479       'target_name': 'ppapi_example_vc',
480       'dependencies': [
481         'ppapi_example_skeleton',
482         'ppapi.gyp:ppapi_cpp',
483         'ppapi.gyp:ppapi_gles2',
484       ],
485       'include_dirs': [
486         'lib/gl/include',
487       ],
488       'sources': [
489         'examples/video_capture/video_capture.cc',
490       ],
491     },
492     {
493       'target_name': 'ppapi_example_video_effects',
494       'dependencies': [
495         'ppapi_example_skeleton',
496         'ppapi.gyp:ppapi_cpp',
497       ],
498       'sources': [
499         'examples/video_effects/video_effects.cc',
500       ],
501     },
502     {
503       'target_name': 'ppapi_example_enumerate_devices',
504       'dependencies': [
505         'ppapi_example_skeleton',
506         'ppapi.gyp:ppapi_cpp',
507       ],
508       'sources': [
509         'examples/enumerate_devices/enumerate_devices.cc',
510       ],
511     },
512     {
513       'target_name': 'ppapi_example_flash_topmost',
514       'dependencies': [
515         'ppapi_example_skeleton',
516         'ppapi.gyp:ppapi_cpp',
517       ],
518       'sources': [
519         'examples/flash_topmost/flash_topmost.cc',
520       ],
521     },
522     {
523       'target_name': 'ppapi_example_printing',
524       'dependencies': [
525         'ppapi_example_skeleton',
526         'ppapi.gyp:ppapi_cpp',
527       ],
528       'sources': [
529         'examples/printing/printing.cc',
530       ],
531       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
532       'msvs_disabled_warnings': [ 4267, ],
533     },
534     {
535       'target_name': 'ppapi_example_media_stream_audio',
536       'dependencies': [
537         'ppapi_example_skeleton',
538         'ppapi.gyp:ppapi_cpp',
539       ],
540       'sources': [
541         'examples/media_stream_audio/media_stream_audio.cc',
542       ],
543     },
544     {
545       'target_name': 'ppapi_example_media_stream_video',
546       'dependencies': [
547         'ppapi_example_skeleton',
548         'ppapi.gyp:ppapi_cpp',
549         'ppapi.gyp:ppapi_gles2',
550       ],
551       'include_dirs': [
552         'lib/gl/include',
553       ],
554       'sources': [
555         'examples/media_stream_video/media_stream_video.cc',
556       ],
557     },
558     {
559       'target_name': 'ppapi_example_gles2_spinning_cube',
560       'dependencies': [
561         'ppapi_example_skeleton',
562         'ppapi.gyp:ppapi_cpp',
563         'ppapi.gyp:ppapi_gles2',
564       ],
565       'include_dirs': [
566         'lib/gl/include',
567       ],
568       'sources': [
569         'examples/gles2_spinning_cube/gles2_spinning_cube.cc',
570         'examples/gles2_spinning_cube/spinning_cube.cc',
571         'examples/gles2_spinning_cube/spinning_cube.h',
572       ],
573     },
574   ],
575 }