JSONStringValueSerializer takes a StringPiece instead of std::string&.
[chromium-blink-merge.git] / ppapi / ppapi_tests.gypi
blobd7bf04766a0178b6970b85908e42b20975f0f9e6
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           # 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       # GN version: //ppapi:ppapi_unittest_shared
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         # Note: sources list duplicated in GN build.
100         'proxy/ppapi_proxy_test.cc',
101         'proxy/ppapi_proxy_test.h',
102         'proxy/resource_message_test_sink.cc',
103         'proxy/resource_message_test_sink.h',
104         'shared_impl/test_globals.cc',
105         'shared_impl/test_globals.h',
106         'shared_impl/unittest_utils.cc',
107         'shared_impl/unittest_utils.h',
108       ],
109     },
111     {
112       'target_name': 'ppapi_perftests',
113       'type': 'executable',
114       'variables': {
115         'chromium_code': 1,
116       },
117       'dependencies': [
118         'ppapi_proxy',
119         'ppapi_shared',
120         'ppapi_unittest_shared',
121         '../base/base.gyp:test_support_base',
122         '../testing/gtest.gyp:gtest',
123       ],
124       'sources': [
125         'proxy/ppapi_perftests.cc',
126         'proxy/ppp_messaging_proxy_perftest.cc',
127       ],
128       'conditions': [
129         # See http://crbug.com/162998#c4 for why this is needed.
130         ['OS=="linux" and use_allocator!="none"', {
131           'dependencies': [
132             '../base/allocator/allocator.gyp:allocator',
133           ],
134         }],
135       ],
136     },
137     {
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         'host/resource_message_filter_unittest.cc',
160         'proxy/device_enumeration_resource_helper_unittest.cc',
161         'proxy/file_chooser_resource_unittest.cc',
162         'proxy/file_system_resource_unittest.cc',
163         'proxy/flash_resource_unittest.cc',
164         'proxy/interface_list_unittest.cc',
165         'proxy/mock_resource.cc',
166         'proxy/mock_resource.h',
167         'proxy/nacl_message_scanner_unittest.cc',
168         'proxy/pdf_resource_unittest.cc',
169         'proxy/plugin_dispatcher_unittest.cc',
170         'proxy/plugin_resource_tracker_unittest.cc',
171         'proxy/plugin_var_tracker_unittest.cc',
172         'proxy/ppb_var_unittest.cc',
173         'proxy/ppp_instance_private_proxy_unittest.cc',
174         'proxy/ppp_instance_proxy_unittest.cc',
175         'proxy/ppp_messaging_proxy_unittest.cc',
176         'proxy/printing_resource_unittest.cc',
177         'proxy/raw_var_data_unittest.cc',
178         'proxy/serialized_var_unittest.cc',
179         'proxy/talk_resource_unittest.cc',
180         'proxy/video_decoder_resource_unittest.cc',
181         'proxy/websocket_resource_unittest.cc',
182         'shared_impl/media_stream_audio_track_shared_unittest.cc',
183         'shared_impl/media_stream_buffer_manager_unittest.cc',
184         'shared_impl/media_stream_video_track_shared_unittest.cc',
185         'shared_impl/proxy_lock_unittest.cc',
186         'shared_impl/resource_tracker_unittest.cc',
187         'shared_impl/thread_aware_callback_unittest.cc',
188         'shared_impl/time_conversion_unittest.cc',
189         'shared_impl/tracked_callback_unittest.cc',
190         'shared_impl/var_tracker_unittest.cc',
191       ],
192       'conditions': [
193         [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
194           'conditions': [
195             [ 'use_allocator!="none"', {
196               'dependencies': [
197                 '../base/allocator/allocator.gyp:allocator',
198               ],
199             }],
200           ],
201         }],
202       ],
203       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
204       'msvs_disabled_warnings': [ 4267, ],
205     },
206     {
207       'target_name': 'ppapi_example_skeleton',
208       'suppress_wildcard': 1,
209       'type': 'none',
210       'direct_dependent_settings': {
211         'product_name': '>(_target_name)',
212         'conditions': [
213           ['os_posix==1 and OS!="mac"', {
214             'cflags': ['-fvisibility=hidden'],
215             'type': 'shared_library',
216           }],
217           ['OS=="win"', {
218             'type': 'shared_library',
219           }],
220           ['OS=="mac"', {
221             'type': 'loadable_module',
222             'mac_bundle': 1,
223             'product_extension': 'plugin',
224             'xcode_settings': {
225               'OTHER_LDFLAGS': [
226                 # Not to strip important symbols by -Wl,-dead_strip.
227                 '-Wl,-exported_symbol,_PPP_GetInterface',
228                 '-Wl,-exported_symbol,_PPP_InitializeModule',
229                 '-Wl,-exported_symbol,_PPP_ShutdownModule'
230               ]},
231           }],
232         ],
233       },
234     },
235     {
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       'target_name': 'ppapi_example_mouse_lock',
247       'dependencies': [
248         'ppapi_example_skeleton',
249         'ppapi.gyp:ppapi_cpp',
250       ],
251       'sources': [
252         'examples/mouse_lock/mouse_lock.cc',
253       ],
254     },
256     {
257       'target_name': 'ppapi_example_gamepad',
258       'dependencies': [
259         'ppapi_example_skeleton',
260         'ppapi.gyp:ppapi_cpp',
261       ],
262       'sources': [
263         'examples/gamepad/gamepad.cc',
264       ],
265       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
266       'msvs_disabled_warnings': [ 4267, ],
267     },
269     {
270       'target_name': 'ppapi_example_c_stub',
271       'dependencies': [
272         'ppapi_example_skeleton',
273         'ppapi.gyp:ppapi_c',
274       ],
275       'sources': [
276         'examples/stub/stub.c',
277       ],
278     },
279     {
280       'target_name': 'ppapi_example_cc_stub',
281       'dependencies': [
282         'ppapi_example_skeleton',
283         'ppapi.gyp:ppapi_cpp',
284       ],
285       'sources': [
286         'examples/stub/stub.cc',
287       ],
288     },
289     {
290       'target_name': 'ppapi_example_crxfs',
291       'dependencies': [
292         'ppapi_example_skeleton',
293         'ppapi.gyp:ppapi_cpp',
294       ],
295       'sources': [
296         'examples/crxfs/crxfs.cc',
297       ],
298     },
299     {
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       'target_name': 'ppapi_example_audio_input',
311       'dependencies': [
312         'ppapi_example_skeleton',
313         'ppapi.gyp:ppapi_cpp',
314       ],
315       'sources': [
316         'examples/audio_input/audio_input.cc',
317       ],
318     },
319     {
320       'target_name': 'ppapi_example_file_chooser',
321       'dependencies': [
322         'ppapi_example_skeleton',
323         'ppapi.gyp:ppapi_cpp',
324       ],
325       'sources': [
326         'examples/file_chooser/file_chooser.cc',
327       ],
328     },
329     {
330       'target_name': 'ppapi_example_graphics_2d',
331       'dependencies': [
332         'ppapi_example_skeleton',
333         'ppapi.gyp:ppapi_c',
334       ],
335       'sources': [
336         'examples/2d/graphics_2d_example.c',
337       ],
338     },
339     {
340       'target_name': 'ppapi_example_ime',
341       'dependencies': [
342         'ppapi_example_skeleton',
343         'ppapi.gyp:ppapi_cpp',
344       ],
345       'sources': [
346         'examples/ime/ime.cc',
347       ],
348       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
349       'msvs_disabled_warnings': [ 4267, ],
350     },
351     {
352       'target_name': 'ppapi_example_paint_manager',
353       'dependencies': [
354         'ppapi_example_skeleton',
355         'ppapi.gyp:ppapi_cpp',
356       ],
357       'sources': [
358         'examples/2d/paint_manager_example.cc',
359       ],
360     },
361     {
362       'target_name': 'ppapi_example_input',
363       'dependencies': [
364         'ppapi_example_skeleton',
365         'ppapi.gyp:ppapi_cpp',
366       ],
367       'sources': [
368         'examples/input/pointer_event_input.cc',
369       ],
370     },
371     {
372       'target_name': 'ppapi_example_post_message',
373       'dependencies': [
374         'ppapi_example_skeleton',
375         'ppapi.gyp:ppapi_cpp',
376       ],
377       'sources': [
378         'examples/scripting/post_message.cc',
379       ],
380     },
381     {
382       'target_name': 'ppapi_example_scaling',
383       'dependencies': [
384         'ppapi_example_skeleton',
385         'ppapi.gyp:ppapi_cpp',
386       ],
387       'sources': [
388         'examples/scaling/scaling.cc',
389       ],
390     },
391     {
392       'target_name': 'ppapi_example_scroll',
393       'dependencies': [
394         'ppapi_example_skeleton',
395         'ppapi.gyp:ppapi_cpp',
396       ],
397       'sources': [
398         'examples/2d/scroll.cc',
399       ],
400     },
401     {
402       'target_name': 'ppapi_example_simple_font',
403       'dependencies': [
404         'ppapi_example_skeleton',
405         'ppapi.gyp:ppapi_cpp',
406       ],
407       'sources': [
408         'examples/font/simple_font.cc',
409       ],
410     },
411     {
412       'target_name': 'ppapi_example_url_loader',
413       'dependencies': [
414         'ppapi_example_skeleton',
415         'ppapi.gyp:ppapi_cpp',
416       ],
417       'sources': [
418         'examples/url_loader/streaming.cc',
419       ],
420     },
421     {
422       'target_name': 'ppapi_example_url_loader_file',
423       'dependencies': [
424         'ppapi_example_skeleton',
425         'ppapi.gyp:ppapi_cpp',
426       ],
427       'sources': [
428         'examples/url_loader/stream_to_file.cc',
429       ],
430     },
431     {
432       'target_name': 'ppapi_example_gles2',
433       'dependencies': [
434         'ppapi_example_skeleton',
435         'ppapi.gyp:ppapi_cpp',
436         'ppapi.gyp:ppapi_gles2',
437       ],
438       'include_dirs': [
439         'lib/gl/include',
440       ],
441       'sources': [
442         'examples/gles2/gles2.cc',
443       ],
444     },
445     {
446       'target_name': 'ppapi_example_video_decode',
447       'dependencies': [
448         'ppapi_example_skeleton',
449         'ppapi.gyp:ppapi_cpp',
450         'ppapi.gyp:ppapi_gles2',
451       ],
452       'include_dirs': [
453         'lib/gl/include',
454       ],
455       'sources': [
456         'examples/video_decode/video_decode.cc',
457         'examples/video_decode/testdata.h',
458       ],
459       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
460       'msvs_disabled_warnings': [ 4267, ],
461     },
462     {
463       'target_name': 'ppapi_example_video_decode_dev',
464       'dependencies': [
465         'ppapi_example_skeleton',
466         'ppapi.gyp:ppapi_cpp',
467         'ppapi.gyp:ppapi_gles2',
468       ],
469       'include_dirs': [
470         'lib/gl/include',
471       ],
472       'sources': [
473         'examples/video_decode/video_decode_dev.cc',
474         'examples/video_decode/testdata.h',
475       ],
476       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
477       'msvs_disabled_warnings': [ 4267, ],
478     },
479     {
480       'target_name': 'ppapi_example_vc',
481       'dependencies': [
482         'ppapi_example_skeleton',
483         'ppapi.gyp:ppapi_cpp',
484         'ppapi.gyp:ppapi_gles2',
485       ],
486       'include_dirs': [
487         'lib/gl/include',
488       ],
489       'sources': [
490         'examples/video_capture/video_capture.cc',
491       ],
492     },
493     {
494       'target_name': 'ppapi_example_video_effects',
495       'dependencies': [
496         'ppapi_example_skeleton',
497         'ppapi.gyp:ppapi_cpp',
498       ],
499       'sources': [
500         'examples/video_effects/video_effects.cc',
501       ],
502     },
503     {
504       'target_name': 'ppapi_example_enumerate_devices',
505       'dependencies': [
506         'ppapi_example_skeleton',
507         'ppapi.gyp:ppapi_cpp',
508       ],
509       'sources': [
510         'examples/enumerate_devices/enumerate_devices.cc',
511       ],
512     },
513     {
514       'target_name': 'ppapi_example_flash_topmost',
515       'dependencies': [
516         'ppapi_example_skeleton',
517         'ppapi.gyp:ppapi_cpp',
518       ],
519       'sources': [
520         'examples/flash_topmost/flash_topmost.cc',
521       ],
522     },
523     {
524       'target_name': 'ppapi_example_printing',
525       'dependencies': [
526         'ppapi_example_skeleton',
527         'ppapi.gyp:ppapi_cpp',
528       ],
529       'sources': [
530         'examples/printing/printing.cc',
531       ],
532       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
533       'msvs_disabled_warnings': [ 4267, ],
534     },
535     {
536       'target_name': 'ppapi_example_media_stream_audio',
537       'dependencies': [
538         'ppapi_example_skeleton',
539         'ppapi.gyp:ppapi_cpp',
540       ],
541       'sources': [
542         'examples/media_stream_audio/media_stream_audio.cc',
543       ],
544     },
545     {
546       'target_name': 'ppapi_example_media_stream_video',
547       'dependencies': [
548         'ppapi_example_skeleton',
549         'ppapi.gyp:ppapi_cpp',
550         'ppapi.gyp:ppapi_gles2',
551       ],
552       'include_dirs': [
553         'lib/gl/include',
554       ],
555       'sources': [
556         'examples/media_stream_video/media_stream_video.cc',
557       ],
558     },
559     {
560       'target_name': 'ppapi_example_gles2_spinning_cube',
561       'dependencies': [
562         'ppapi_example_skeleton',
563         'ppapi.gyp:ppapi_cpp',
564         'ppapi.gyp:ppapi_gles2',
565       ],
566       'include_dirs': [
567         'lib/gl/include',
568       ],
569       'sources': [
570         'examples/gles2_spinning_cube/gles2_spinning_cube.cc',
571         'examples/gles2_spinning_cube/spinning_cube.cc',
572         'examples/gles2_spinning_cube/spinning_cube.h',
573       ],
574     },
575     {
576       'target_name': 'ppapi_example_compositor',
577       'dependencies': [
578         'ppapi_example_skeleton',
579         'ppapi.gyp:ppapi_cpp',
580         'ppapi.gyp:ppapi_gles2',
581       ],
582       'include_dirs': [
583         'lib/gl/include',
584       ],
585       'sources': [
586         'examples/compositor/compositor.cc',
587         'examples/compositor/spinning_cube.cc',
588         'examples/compositor/spinning_cube.h',
589       ],
590     },
591   ],