[Downloads] Add a RESUMING_INTERNAL state to DownloadItem.
[chromium-blink-merge.git] / ppapi / ppapi_tests.gypi
blobffd577f2e20d005d1d29db10ae7d7c5989219cfe
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       '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       ],
105     },
107     {
108       'target_name': 'ppapi_perftests',
109       'type': 'executable',
110       'variables': {
111         'chromium_code': 1,
112       },
113       'dependencies': [
114         'ppapi_proxy',
115         'ppapi_shared',
116         'ppapi_unittest_shared',
117         '../base/base.gyp:test_support_base',
118         '../testing/gtest.gyp:gtest',
119       ],
120       'sources': [
121         'proxy/ppapi_perftests.cc',
122         'proxy/ppp_messaging_proxy_perftest.cc',
123       ],
124     },
125     {
126       'target_name': 'ppapi_unittests',
127       'type': 'executable',
128       'variables': {
129         'chromium_code': 1,
130       },
131       'dependencies': [
132         'ppapi_host',
133         'ppapi_proxy',
134         'ppapi_shared',
135         'ppapi_unittest_shared',
136         '../base/base.gyp:test_support_base',
137         '../gpu/gpu.gyp:gpu_ipc',
138         '../ipc/ipc.gyp:ipc',
139         '../ipc/ipc.gyp:test_support_ipc',
140         '../media/media.gyp:shared_memory_support',
141         '../testing/gmock.gyp:gmock',
142         '../testing/gtest.gyp:gtest',
143         '../ui/surface/surface.gyp:surface',
144       ],
145       'sources': [
146         'proxy/run_all_unittests.cc',
148         'host/resource_message_filter_unittest.cc',
149         'proxy/device_enumeration_resource_helper_unittest.cc',
150         'proxy/file_chooser_resource_unittest.cc',
151         'proxy/flash_resource_unittest.cc',
152         'proxy/mock_resource.cc',
153         'proxy/mock_resource.h',
154         'proxy/pdf_resource_unittest.cc',
155         'proxy/plugin_dispatcher_unittest.cc',
156         'proxy/plugin_resource_tracker_unittest.cc',
157         'proxy/plugin_var_tracker_unittest.cc',
158         'proxy/ppb_var_unittest.cc',
159         'proxy/ppp_instance_private_proxy_unittest.cc',
160         'proxy/ppp_instance_proxy_unittest.cc',
161         'proxy/ppp_messaging_proxy_unittest.cc',
162         'proxy/printing_resource_unittest.cc',
163         'proxy/raw_var_data_unittest.cc',
164         'proxy/serialized_var_unittest.cc',
165         'proxy/websocket_resource_unittest.cc',
166         'shared_impl/resource_tracker_unittest.cc',
167         'shared_impl/thread_aware_callback_unittest.cc',
168         'shared_impl/time_conversion_unittest.cc',
169         'shared_impl/tracked_callback_unittest.cc',
170         'shared_impl/var_tracker_unittest.cc',
171         'shared_impl/var_value_conversions_unittest.cc',
172       ],
173       'conditions': [
174         [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
175           'conditions': [
176             [ 'linux_use_tcmalloc == 1', {
177               'dependencies': [
178                 '../base/allocator/allocator.gyp:allocator',
179               ],
180             }],
181           ],
182         }],
183       ],
184       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
185       'msvs_disabled_warnings': [ 4267, ],          
186     },
187     {
188       'target_name': 'ppapi_example_skeleton',
189       'suppress_wildcard': 1,
190       'type': 'none',
191       'direct_dependent_settings': {
192         'product_name': '>(_target_name)',
193         'conditions': [
194           ['os_posix==1 and OS!="mac"', {
195             'cflags': ['-fvisibility=hidden'],
196             'type': 'shared_library',
197             # -gstabs, used in the official builds, causes an ICE. Simply remove
198             # it.
199             'cflags!': ['-gstabs'],
200           }],
201           ['OS=="win"', {
202             'type': 'shared_library',
203           }],
204           ['OS=="mac"', {
205             'type': 'loadable_module',
206             'mac_bundle': 1,
207             'product_extension': 'plugin',
208             'xcode_settings': {
209               'OTHER_LDFLAGS': [
210                 # Not to strip important symbols by -Wl,-dead_strip.
211                 '-Wl,-exported_symbol,_PPP_GetInterface',
212                 '-Wl,-exported_symbol,_PPP_InitializeModule',
213                 '-Wl,-exported_symbol,_PPP_ShutdownModule'
214               ]},
215           }],
216         ],
217       },
218     },
219     {
220       'target_name': 'ppapi_example_mouse_cursor',
221       'dependencies': [
222         'ppapi_example_skeleton',
223         'ppapi.gyp:ppapi_cpp',
224       ],
225       'sources': [
226         'examples/mouse_cursor/mouse_cursor.cc',
227       ],
228     },
229     {
230       'target_name': 'ppapi_example_mouse_lock',
231       'dependencies': [
232         'ppapi_example_skeleton',
233         'ppapi.gyp:ppapi_cpp',
234       ],
235       'sources': [
236         'examples/mouse_lock/mouse_lock.cc',
237       ],
238     },
240     {
241       'target_name': 'ppapi_example_gamepad',
242       'dependencies': [
243         'ppapi_example_skeleton',
244         'ppapi.gyp:ppapi_cpp',
245       ],
246       'sources': [
247         'examples/gamepad/gamepad.cc',
248       ],
249       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
250       'msvs_disabled_warnings': [ 4267, ],
251     },
253     {
254       'target_name': 'ppapi_example_c_stub',
255       'dependencies': [
256         'ppapi_example_skeleton',
257         'ppapi.gyp:ppapi_c',
258       ],
259       'sources': [
260         'examples/stub/stub.c',
261       ],
262     },
263     {
264       'target_name': 'ppapi_example_cc_stub',
265       'dependencies': [
266         'ppapi_example_skeleton',
267         'ppapi.gyp:ppapi_cpp',
268       ],
269       'sources': [
270         'examples/stub/stub.cc',
271       ],
272     },
273     {
274       'target_name': 'ppapi_example_crxfs',
275       'dependencies': [
276         'ppapi_example_skeleton',
277         'ppapi.gyp:ppapi_cpp',
278       ],
279       'sources': [
280         'examples/crxfs/crxfs.cc',
281       ],
282     },
283     {
284       'target_name': 'ppapi_example_audio',
285       'dependencies': [
286         'ppapi_example_skeleton',
287         'ppapi.gyp:ppapi_cpp',
288       ],
289       'sources': [
290         'examples/audio/audio.cc',
291       ],
292     },
293     {
294       'target_name': 'ppapi_example_audio_input',
295       'dependencies': [
296         'ppapi_example_skeleton',
297         'ppapi.gyp:ppapi_cpp',
298       ],
299       'sources': [
300         'examples/audio_input/audio_input.cc',
301       ],
302     },
303     {
304       'target_name': 'ppapi_example_file_chooser',
305       'dependencies': [
306         'ppapi_example_skeleton',
307         'ppapi.gyp:ppapi_cpp',
308       ],
309       'sources': [
310         'examples/file_chooser/file_chooser.cc',
311       ],
312     },
313     {
314       'target_name': 'ppapi_example_graphics_2d',
315       'dependencies': [
316         'ppapi_example_skeleton',
317         'ppapi.gyp:ppapi_c',
318       ],
319       'sources': [
320         'examples/2d/graphics_2d_example.c',
321       ],
322     },
323     {
324       'target_name': 'ppapi_example_ime',
325       'dependencies': [
326         'ppapi_example_skeleton',
327         'ppapi.gyp:ppapi_cpp',
328       ],
329       'sources': [
330         'examples/ime/ime.cc',
331       ],
332       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
333       'msvs_disabled_warnings': [ 4267, ],
334     },
335     {
336       'target_name': 'ppapi_example_paint_manager',
337       'dependencies': [
338         'ppapi_example_skeleton',
339         'ppapi.gyp:ppapi_cpp',
340       ],
341       'sources': [
342         'examples/2d/paint_manager_example.cc',
343       ],
344     },
345     {
346       'target_name': 'ppapi_example_input',
347       'dependencies': [
348         'ppapi_example_skeleton',
349         'ppapi.gyp:ppapi_cpp',
350       ],
351       'sources': [
352         'examples/input/pointer_event_input.cc',
353       ],
354     },
355     {
356       'target_name': 'ppapi_example_post_message',
357       'dependencies': [
358         'ppapi_example_skeleton',
359         'ppapi.gyp:ppapi_cpp',
360       ],
361       'sources': [
362         'examples/scripting/post_message.cc',
363       ],
364     },
365     {
366       'target_name': 'ppapi_example_scaling',
367       'dependencies': [
368         'ppapi_example_skeleton',
369         'ppapi.gyp:ppapi_cpp',
370       ],
371       'sources': [
372         'examples/scaling/scaling.cc',
373       ],
374     },
375     {
376       'target_name': 'ppapi_example_scroll',
377       'dependencies': [
378         'ppapi_example_skeleton',
379         'ppapi.gyp:ppapi_cpp',
380       ],
381       'sources': [
382         'examples/2d/scroll.cc',
383       ],
384     },
385     {
386       'target_name': 'ppapi_example_simple_font',
387       'dependencies': [
388         'ppapi_example_skeleton',
389         'ppapi.gyp:ppapi_cpp',
390       ],
391       'sources': [
392         'examples/font/simple_font.cc',
393       ],
394     },
395     {
396       'target_name': 'ppapi_example_url_loader',
397       'dependencies': [
398         'ppapi_example_skeleton',
399         'ppapi.gyp:ppapi_cpp',
400       ],
401       'sources': [
402         'examples/url_loader/streaming.cc',
403       ],
404     },
405     {
406       'target_name': 'ppapi_example_url_loader_file',
407       'dependencies': [
408         'ppapi_example_skeleton',
409         'ppapi.gyp:ppapi_cpp',
410       ],
411       'sources': [
412         'examples/url_loader/stream_to_file.cc',
413       ],
414     },
415     {
416       'target_name': 'ppapi_example_gles2',
417       'dependencies': [
418         'ppapi_example_skeleton',
419         'ppapi.gyp:ppapi_cpp',
420         'ppapi.gyp:ppapi_gles2',
421         'ppapi.gyp:ppapi_egl',
422       ],
423       'include_dirs': [
424         'lib/gl/include',
425       ],
426       'sources': [
427         'examples/gles2/gles2.cc',
428       ],
429     },
430     {
431       'target_name': 'ppapi_example_video_decode',
432       'dependencies': [
433         'ppapi_example_skeleton',
434         'ppapi.gyp:ppapi_cpp',
435         'ppapi.gyp:ppapi_gles2',
436         'ppapi.gyp:ppapi_egl',
437       ],
438       'include_dirs': [
439         'lib/gl/include',
440       ],
441       'sources': [
442         'examples/video_decode/video_decode.cc',
443         'examples/video_decode/testdata.h',
444       ],
445       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
446       'msvs_disabled_warnings': [ 4267, ],
447     },
448     {
449       'target_name': 'ppapi_example_vc',
450       'dependencies': [
451         'ppapi_example_skeleton',
452         'ppapi.gyp:ppapi_cpp',
453         'ppapi.gyp:ppapi_gles2',
454         'ppapi.gyp:ppapi_egl',
455       ],
456       'include_dirs': [
457         'lib/gl/include',
458       ],
459       'sources': [
460         'examples/video_capture/video_capture.cc',
461       ],
462     },
463     {
464       'target_name': 'ppapi_example_enumerate_devices',
465       'dependencies': [
466         'ppapi_example_skeleton',
467         'ppapi.gyp:ppapi_cpp',
468       ],
469       'sources': [
470         'examples/enumerate_devices/enumerate_devices.cc',
471       ],
472     },
473     {
474       'target_name': 'ppapi_example_flash_topmost',
475       'dependencies': [
476         'ppapi_example_skeleton',
477         'ppapi.gyp:ppapi_cpp',
478       ],
479       'sources': [
480         'examples/flash_topmost/flash_topmost.cc',
481       ],
482     },
483     {
484       'target_name': 'ppapi_example_printing',
485       'dependencies': [
486         'ppapi_example_skeleton',
487         'ppapi.gyp:ppapi_cpp',
488       ],
489       'sources': [
490         'examples/printing/printing.cc',
491       ],
492       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
493       'msvs_disabled_warnings': [ 4267, ],
494     },
495   ],