Handle small window sizes better in SafeBrowsing interstitials.
[chromium-blink-merge.git] / ppapi / ppapi_tests.gypi
blobc989d9c9b384730233ebc0d9ab6fc6d332e12878
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         }],
59         ['OS=="mac"', {
60           'mac_bundle': 1,
61           'product_name': 'ppapi_tests',
62           'product_extension': 'plugin',
63         }],
64       ],
65 # TODO(dmichael):  Figure out what is wrong with the script on Windows and add
66 #                  it as an automated action.
67 #      'actions': [
68 #        {
69 #          'action_name': 'generate_ppapi_include_tests',
70 #          'inputs': [],
71 #          'outputs': [
72 #            'tests/test_c_includes.c',
73 #            'tests/test_cc_includes.cc',
74 #          ],
75 #          'action': [
76 #            '<!@(python generate_ppapi_include_tests.py)',
77 #          ],
78 #        },
79 #      ],
80     },
81     {
82       'target_name': 'ppapi_unittest_shared',
83       'type': 'static_library',
84       'dependencies': [
85         'ppapi_proxy',
86         'ppapi_shared',
87         '../base/base.gyp:test_support_base',
88         '../ipc/ipc.gyp:ipc',
89         '../ipc/ipc.gyp:test_support_ipc',
90         '../testing/gmock.gyp:gmock',
91         '../testing/gtest.gyp:gtest',
92       ],
93       'sources': [
94         'proxy/ppapi_proxy_test.cc',
95         'proxy/ppapi_proxy_test.h',
96         'proxy/resource_message_test_sink.cc',
97         'proxy/resource_message_test_sink.h',
98         'shared_impl/test_globals.cc',
99         'shared_impl/test_globals.h',
100       ],
101     },
103     {
104       'target_name': 'ppapi_perftests',
105       'type': 'executable',
106       'variables': {
107         'chromium_code': 1,
108       },
109       'dependencies': [
110         'ppapi_proxy',
111         'ppapi_shared',
112         'ppapi_unittest_shared',
113         '../base/base.gyp:test_support_base',
114         '../testing/gtest.gyp:gtest',
115       ],
116       'sources': [
117         'proxy/ppapi_perftests.cc',
118         'proxy/ppp_messaging_proxy_perftest.cc',
119       ],
120     },
121     {
122       'target_name': 'ppapi_unittests',
123       'type': 'executable',
124       'variables': {
125         'chromium_code': 1,
126       },
127       'dependencies': [
128         'ppapi_host',
129         'ppapi_proxy',
130         'ppapi_shared',
131         'ppapi_unittest_shared',
132         '../base/base.gyp:test_support_base',
133         '../gpu/gpu.gyp:gpu_ipc',
134         '../ipc/ipc.gyp:ipc',
135         '../ipc/ipc.gyp:test_support_ipc',
136         '../media/media.gyp:shared_memory_support',
137         '../testing/gmock.gyp:gmock',
138         '../testing/gtest.gyp:gtest',
139         '../ui/surface/surface.gyp:surface',
140       ],
141       'sources': [
142         'proxy/run_all_unittests.cc',
144         'host/resource_message_filter_unittest.cc',
145         'proxy/device_enumeration_resource_helper_unittest.cc',
146         'proxy/file_chooser_resource_unittest.cc',
147         'proxy/flash_resource_unittest.cc',
148         'proxy/mock_resource.cc',
149         'proxy/mock_resource.h',
150         'proxy/plugin_dispatcher_unittest.cc',
151         'proxy/plugin_resource_tracker_unittest.cc',
152         'proxy/plugin_var_tracker_unittest.cc',
153         'proxy/ppb_var_unittest.cc',
154         'proxy/ppp_instance_private_proxy_unittest.cc',
155         'proxy/ppp_instance_proxy_unittest.cc',
156         'proxy/ppp_messaging_proxy_unittest.cc',
157         'proxy/printing_resource_unittest.cc',
158         'proxy/serialized_var_unittest.cc',
159         'proxy/websocket_resource_unittest.cc',
160         'shared_impl/resource_tracker_unittest.cc',
161         'shared_impl/tracked_callback_unittest.cc',
162         'shared_impl/var_tracker_unittest.cc',
163       ],
164       'conditions': [
165         [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
166           'conditions': [
167             [ 'linux_use_tcmalloc == 1', {
168               'dependencies': [
169                 '../base/allocator/allocator.gyp:allocator',
170               ],
171             }],
172           ],
173         }],
174       ],
175     },
176     {
177       'target_name': 'ppapi_example_skeleton',
178       'suppress_wildcard': 1,
179       'type': 'none',
180       'direct_dependent_settings': {
181         'product_name': '>(_target_name)',
182         'conditions': [
183           ['os_posix==1 and OS!="mac"', {
184             'cflags': ['-fvisibility=hidden'],
185             'type': 'shared_library',
186             # -gstabs, used in the official builds, causes an ICE. Simply remove
187             # it.
188             'cflags!': ['-gstabs'],
189           }],
190           ['OS=="win"', {
191             'type': 'shared_library',
192           }],
193           ['OS=="mac"', {
194             'type': 'loadable_module',
195             'mac_bundle': 1,
196             'product_extension': 'plugin',
197             'xcode_settings': {
198               'OTHER_LDFLAGS': [
199                 # Not to strip important symbols by -Wl,-dead_strip.
200                 '-Wl,-exported_symbol,_PPP_GetInterface',
201                 '-Wl,-exported_symbol,_PPP_InitializeModule',
202                 '-Wl,-exported_symbol,_PPP_ShutdownModule'
203               ]},
204           }],
205         ],
206       },
207     },
208     {
209       'target_name': 'ppapi_example_mouse_cursor',
210       'dependencies': [
211         'ppapi_example_skeleton',
212         'ppapi.gyp:ppapi_cpp',
213       ],
214       'sources': [
215         'examples/mouse_cursor/mouse_cursor.cc',
216       ],
217     },
218     {
219       'target_name': 'ppapi_example_mouse_lock',
220       'dependencies': [
221         'ppapi_example_skeleton',
222         'ppapi.gyp:ppapi_cpp',
223       ],
224       'sources': [
225         'examples/mouse_lock/mouse_lock.cc',
226       ],
227     },
229     {
230       'target_name': 'ppapi_example_gamepad',
231       'dependencies': [
232         'ppapi_example_skeleton',
233         'ppapi.gyp:ppapi_cpp',
234       ],
235       'sources': [
236         'examples/gamepad/gamepad.cc',
237       ],
238     },
240     {
241       'target_name': 'ppapi_example_c_stub',
242       'dependencies': [
243         'ppapi_example_skeleton',
244         'ppapi.gyp:ppapi_c',
245       ],
246       'sources': [
247         'examples/stub/stub.c',
248       ],
249     },
250     {
251       'target_name': 'ppapi_example_cc_stub',
252       'dependencies': [
253         'ppapi_example_skeleton',
254         'ppapi.gyp:ppapi_cpp',
255       ],
256       'sources': [
257         'examples/stub/stub.cc',
258       ],
259     },
260     {
261       'target_name': 'ppapi_example_audio',
262       'dependencies': [
263         'ppapi_example_skeleton',
264         'ppapi.gyp:ppapi_cpp',
265       ],
266       'sources': [
267         'examples/audio/audio.cc',
268       ],
269     },
270     {
271       'target_name': 'ppapi_example_audio_input',
272       'dependencies': [
273         'ppapi_example_skeleton',
274         'ppapi.gyp:ppapi_cpp',
275       ],
276       'sources': [
277         'examples/audio_input/audio_input.cc',
278       ],
279     },
280     {
281       'target_name': 'ppapi_example_file_chooser',
282       'dependencies': [
283         'ppapi_example_skeleton',
284         'ppapi.gyp:ppapi_cpp',
285       ],
286       'sources': [
287         'examples/file_chooser/file_chooser.cc',
288       ],
289     },
290     {
291       'target_name': 'ppapi_example_graphics_2d',
292       'dependencies': [
293         'ppapi_example_skeleton',
294         'ppapi.gyp:ppapi_c',
295       ],
296       'sources': [
297         'examples/2d/graphics_2d_example.c',
298       ],
299     },
300     {
301       'target_name': 'ppapi_example_ime',
302       'dependencies': [
303         'ppapi_example_skeleton',
304         'ppapi.gyp:ppapi_cpp',
305       ],
306       'sources': [
307         'examples/ime/ime.cc',
308       ],
309     },
310     {
311       'target_name': 'ppapi_example_paint_manager',
312       'dependencies': [
313         'ppapi_example_skeleton',
314         'ppapi.gyp:ppapi_cpp',
315       ],
316       'sources': [
317         'examples/2d/paint_manager_example.cc',
318       ],
319     },
320     {
321       'target_name': 'ppapi_example_input',
322       'dependencies': [
323         'ppapi_example_skeleton',
324         'ppapi.gyp:ppapi_cpp',
325       ],
326       'sources': [
327         'examples/input/pointer_event_input.cc',
328       ],
329     },
330     {
331       'target_name': 'ppapi_example_post_message',
332       'dependencies': [
333         'ppapi_example_skeleton',
334         'ppapi.gyp:ppapi_cpp',
335       ],
336       'sources': [
337         'examples/scripting/post_message.cc',
338       ],
339     },
340     {
341       'target_name': 'ppapi_example_scroll',
342       'dependencies': [
343         'ppapi_example_skeleton',
344         'ppapi.gyp:ppapi_cpp',
345       ],
346       'sources': [
347         'examples/2d/scroll.cc',
348       ],
349     },
350     {
351       'target_name': 'ppapi_example_simple_font',
352       'dependencies': [
353         'ppapi_example_skeleton',
354         'ppapi.gyp:ppapi_cpp',
355       ],
356       'sources': [
357         'examples/font/simple_font.cc',
358       ],
359     },
360     {
361       'target_name': 'ppapi_example_url_loader',
362       'dependencies': [
363         'ppapi_example_skeleton',
364         'ppapi.gyp:ppapi_cpp',
365       ],
366       'sources': [
367         'examples/url_loader/streaming.cc',
368       ],
369     },
370     {
371       'target_name': 'ppapi_example_url_loader_file',
372       'dependencies': [
373         'ppapi_example_skeleton',
374         'ppapi.gyp:ppapi_cpp',
375       ],
376       'sources': [
377         'examples/url_loader/stream_to_file.cc',
378       ],
379     },
380     {
381       'target_name': 'ppapi_example_gles2',
382       'dependencies': [
383         'ppapi_example_skeleton',
384         'ppapi.gyp:ppapi_cpp',
385         'ppapi.gyp:ppapi_gles2',
386         'ppapi.gyp:ppapi_egl',
387       ],
388       'include_dirs': [
389         'lib/gl/include',
390       ],
391       'sources': [
392         'examples/gles2/gles2.cc',
393       ],
394     },
395     {
396       'target_name': 'ppapi_example_video_decode',
397       'dependencies': [
398         'ppapi_example_skeleton',
399         'ppapi.gyp:ppapi_cpp',
400         'ppapi.gyp:ppapi_gles2',
401         'ppapi.gyp:ppapi_egl',
402       ],
403       'include_dirs': [
404         'lib/gl/include',
405       ],
406       'sources': [
407         'examples/video_decode/video_decode.cc',
408         'examples/video_decode/testdata.h',
409       ],
410     },
411     {
412       'target_name': 'ppapi_example_vc',
413       'dependencies': [
414         'ppapi_example_skeleton',
415         'ppapi.gyp:ppapi_cpp',
416         'ppapi.gyp:ppapi_gles2',
417         'ppapi.gyp:ppapi_egl',
418       ],
419       'include_dirs': [
420         'lib/gl/include',
421       ],
422       'sources': [
423         'examples/video_capture/video_capture.cc',
424       ],
425     },
426     {
427       'target_name': 'ppapi_example_enumerate_devices',
428       'dependencies': [
429         'ppapi_example_skeleton',
430         'ppapi.gyp:ppapi_cpp',
431       ],
432       'sources': [
433         'examples/enumerate_devices/enumerate_devices.cc',
434       ],
435     },
436     {
437       'target_name': 'ppapi_example_flash_topmost',
438       'dependencies': [
439         'ppapi_example_skeleton',
440         'ppapi.gyp:ppapi_cpp',
441       ],
442       'sources': [
443         'examples/flash_topmost/flash_topmost.cc',
444       ],
445     },
446     {
447       'target_name': 'ppapi_example_printing',
448       'dependencies': [
449         'ppapi_example_skeleton',
450         'ppapi.gyp:ppapi_cpp',
451       ],
452       'sources': [
453         'examples/printing/printing.cc',
454       ],
455     },
456   ],