Suppress "could not load extension" message for extensions loaded from command line.
[chromium-blink-merge.git] / ppapi / ppapi_tests.gypi
blobc805ef69bde15d18c233436a376b27d9ff323f33
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/plugin_dispatcher_unittest.cc',
155         'proxy/plugin_resource_tracker_unittest.cc',
156         'proxy/plugin_var_tracker_unittest.cc',
157         'proxy/ppb_var_unittest.cc',
158         'proxy/ppp_instance_private_proxy_unittest.cc',
159         'proxy/ppp_instance_proxy_unittest.cc',
160         'proxy/ppp_messaging_proxy_unittest.cc',
161         'proxy/printing_resource_unittest.cc',
162         'proxy/serialized_var_unittest.cc',
163         'proxy/websocket_resource_unittest.cc',
164         'shared_impl/resource_tracker_unittest.cc',
165         'shared_impl/thread_aware_callback_unittest.cc',
166         'shared_impl/time_conversion_unittest.cc',
167         'shared_impl/tracked_callback_unittest.cc',
168         'shared_impl/var_tracker_unittest.cc',
169       ],
170       'conditions': [
171         [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
172           'conditions': [
173             [ 'linux_use_tcmalloc == 1', {
174               'dependencies': [
175                 '../base/allocator/allocator.gyp:allocator',
176               ],
177             }],
178           ],
179         }],
180       ],
181       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
182       'msvs_disabled_warnings': [ 4267, ],          
183     },
184     {
185       'target_name': 'ppapi_example_skeleton',
186       'suppress_wildcard': 1,
187       'type': 'none',
188       'direct_dependent_settings': {
189         'product_name': '>(_target_name)',
190         'conditions': [
191           ['os_posix==1 and OS!="mac"', {
192             'cflags': ['-fvisibility=hidden'],
193             'type': 'shared_library',
194             # -gstabs, used in the official builds, causes an ICE. Simply remove
195             # it.
196             'cflags!': ['-gstabs'],
197           }],
198           ['OS=="win"', {
199             'type': 'shared_library',
200           }],
201           ['OS=="mac"', {
202             'type': 'loadable_module',
203             'mac_bundle': 1,
204             'product_extension': 'plugin',
205             'xcode_settings': {
206               'OTHER_LDFLAGS': [
207                 # Not to strip important symbols by -Wl,-dead_strip.
208                 '-Wl,-exported_symbol,_PPP_GetInterface',
209                 '-Wl,-exported_symbol,_PPP_InitializeModule',
210                 '-Wl,-exported_symbol,_PPP_ShutdownModule'
211               ]},
212           }],
213         ],
214       },
215     },
216     {
217       'target_name': 'ppapi_example_mouse_cursor',
218       'dependencies': [
219         'ppapi_example_skeleton',
220         'ppapi.gyp:ppapi_cpp',
221       ],
222       'sources': [
223         'examples/mouse_cursor/mouse_cursor.cc',
224       ],
225     },
226     {
227       'target_name': 'ppapi_example_mouse_lock',
228       'dependencies': [
229         'ppapi_example_skeleton',
230         'ppapi.gyp:ppapi_cpp',
231       ],
232       'sources': [
233         'examples/mouse_lock/mouse_lock.cc',
234       ],
235     },
237     {
238       'target_name': 'ppapi_example_gamepad',
239       'dependencies': [
240         'ppapi_example_skeleton',
241         'ppapi.gyp:ppapi_cpp',
242       ],
243       'sources': [
244         'examples/gamepad/gamepad.cc',
245       ],
246       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
247       'msvs_disabled_warnings': [ 4267, ],
248     },
250     {
251       'target_name': 'ppapi_example_c_stub',
252       'dependencies': [
253         'ppapi_example_skeleton',
254         'ppapi.gyp:ppapi_c',
255       ],
256       'sources': [
257         'examples/stub/stub.c',
258       ],
259     },
260     {
261       'target_name': 'ppapi_example_cc_stub',
262       'dependencies': [
263         'ppapi_example_skeleton',
264         'ppapi.gyp:ppapi_cpp',
265       ],
266       'sources': [
267         'examples/stub/stub.cc',
268       ],
269     },
270     {
271       'target_name': 'ppapi_example_audio',
272       'dependencies': [
273         'ppapi_example_skeleton',
274         'ppapi.gyp:ppapi_cpp',
275       ],
276       'sources': [
277         'examples/audio/audio.cc',
278       ],
279     },
280     {
281       'target_name': 'ppapi_example_audio_input',
282       'dependencies': [
283         'ppapi_example_skeleton',
284         'ppapi.gyp:ppapi_cpp',
285       ],
286       'sources': [
287         'examples/audio_input/audio_input.cc',
288       ],
289     },
290     {
291       'target_name': 'ppapi_example_file_chooser',
292       'dependencies': [
293         'ppapi_example_skeleton',
294         'ppapi.gyp:ppapi_cpp',
295       ],
296       'sources': [
297         'examples/file_chooser/file_chooser.cc',
298       ],
299     },
300     {
301       'target_name': 'ppapi_example_graphics_2d',
302       'dependencies': [
303         'ppapi_example_skeleton',
304         'ppapi.gyp:ppapi_c',
305       ],
306       'sources': [
307         'examples/2d/graphics_2d_example.c',
308       ],
309     },
310     {
311       'target_name': 'ppapi_example_ime',
312       'dependencies': [
313         'ppapi_example_skeleton',
314         'ppapi.gyp:ppapi_cpp',
315       ],
316       'sources': [
317         'examples/ime/ime.cc',
318       ],
319       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
320       'msvs_disabled_warnings': [ 4267, ],
321     },
322     {
323       'target_name': 'ppapi_example_paint_manager',
324       'dependencies': [
325         'ppapi_example_skeleton',
326         'ppapi.gyp:ppapi_cpp',
327       ],
328       'sources': [
329         'examples/2d/paint_manager_example.cc',
330       ],
331     },
332     {
333       'target_name': 'ppapi_example_input',
334       'dependencies': [
335         'ppapi_example_skeleton',
336         'ppapi.gyp:ppapi_cpp',
337       ],
338       'sources': [
339         'examples/input/pointer_event_input.cc',
340       ],
341     },
342     {
343       'target_name': 'ppapi_example_post_message',
344       'dependencies': [
345         'ppapi_example_skeleton',
346         'ppapi.gyp:ppapi_cpp',
347       ],
348       'sources': [
349         'examples/scripting/post_message.cc',
350       ],
351     },
352     {
353       'target_name': 'ppapi_example_scroll',
354       'dependencies': [
355         'ppapi_example_skeleton',
356         'ppapi.gyp:ppapi_cpp',
357       ],
358       'sources': [
359         'examples/2d/scroll.cc',
360       ],
361     },
362     {
363       'target_name': 'ppapi_example_simple_font',
364       'dependencies': [
365         'ppapi_example_skeleton',
366         'ppapi.gyp:ppapi_cpp',
367       ],
368       'sources': [
369         'examples/font/simple_font.cc',
370       ],
371     },
372     {
373       'target_name': 'ppapi_example_url_loader',
374       'dependencies': [
375         'ppapi_example_skeleton',
376         'ppapi.gyp:ppapi_cpp',
377       ],
378       'sources': [
379         'examples/url_loader/streaming.cc',
380       ],
381     },
382     {
383       'target_name': 'ppapi_example_url_loader_file',
384       'dependencies': [
385         'ppapi_example_skeleton',
386         'ppapi.gyp:ppapi_cpp',
387       ],
388       'sources': [
389         'examples/url_loader/stream_to_file.cc',
390       ],
391     },
392     {
393       'target_name': 'ppapi_example_gles2',
394       'dependencies': [
395         'ppapi_example_skeleton',
396         'ppapi.gyp:ppapi_cpp',
397         'ppapi.gyp:ppapi_gles2',
398         'ppapi.gyp:ppapi_egl',
399       ],
400       'include_dirs': [
401         'lib/gl/include',
402       ],
403       'sources': [
404         'examples/gles2/gles2.cc',
405       ],
406     },
407     {
408       'target_name': 'ppapi_example_video_decode',
409       'dependencies': [
410         'ppapi_example_skeleton',
411         'ppapi.gyp:ppapi_cpp',
412         'ppapi.gyp:ppapi_gles2',
413         'ppapi.gyp:ppapi_egl',
414       ],
415       'include_dirs': [
416         'lib/gl/include',
417       ],
418       'sources': [
419         'examples/video_decode/video_decode.cc',
420         'examples/video_decode/testdata.h',
421       ],
422       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
423       'msvs_disabled_warnings': [ 4267, ],
424     },
425     {
426       'target_name': 'ppapi_example_vc',
427       'dependencies': [
428         'ppapi_example_skeleton',
429         'ppapi.gyp:ppapi_cpp',
430         'ppapi.gyp:ppapi_gles2',
431         'ppapi.gyp:ppapi_egl',
432       ],
433       'include_dirs': [
434         'lib/gl/include',
435       ],
436       'sources': [
437         'examples/video_capture/video_capture.cc',
438       ],
439     },
440     {
441       'target_name': 'ppapi_example_enumerate_devices',
442       'dependencies': [
443         'ppapi_example_skeleton',
444         'ppapi.gyp:ppapi_cpp',
445       ],
446       'sources': [
447         'examples/enumerate_devices/enumerate_devices.cc',
448       ],
449     },
450     {
451       'target_name': 'ppapi_example_flash_topmost',
452       'dependencies': [
453         'ppapi_example_skeleton',
454         'ppapi.gyp:ppapi_cpp',
455       ],
456       'sources': [
457         'examples/flash_topmost/flash_topmost.cc',
458       ],
459     },
460     {
461       'target_name': 'ppapi_example_printing',
462       'dependencies': [
463         'ppapi_example_skeleton',
464         'ppapi.gyp:ppapi_cpp',
465       ],
466       'sources': [
467         'examples/printing/printing.cc',
468       ],
469       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
470       'msvs_disabled_warnings': [ 4267, ],
471     },
472   ],