Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / cc / cc_tests.gyp
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   'variables': {
7     'chromium_code': 1,
8     'cc_unit_tests_source_files': [
9       'animation/animation_unittest.cc',
10       'animation/keyframed_animation_curve_unittest.cc',
11       'animation/layer_animation_controller_unittest.cc',
12       'animation/scroll_offset_animation_curve_unittest.cc',
13       'animation/scrollbar_animation_controller_linear_fade_unittest.cc',
14       'animation/scrollbar_animation_controller_thinning_unittest.cc',
15       'animation/transform_operations_unittest.cc',
16       'base/float_quad_unittest.cc',
17       'base/math_util_unittest.cc',
18       'base/region_unittest.cc',
19       'base/rolling_time_delta_history_unittest.cc',
20       'base/scoped_ptr_vector_unittest.cc',
21       'base/tiling_data_unittest.cc',
22       'base/util_unittest.cc',
23       'debug/micro_benchmark_controller_unittest.cc',
24       'input/top_controls_manager_unittest.cc',
25       'layers/content_layer_unittest.cc',
26       'layers/contents_scaling_layer_unittest.cc',
27       'layers/delegated_frame_provider_unittest.cc',
28       'layers/delegated_frame_resource_collection_unittest.cc',
29       'layers/delegated_renderer_layer_impl_unittest.cc',
30       'layers/heads_up_display_unittest.cc',
31       'layers/heads_up_display_layer_impl_unittest.cc',
32       'layers/layer_impl_unittest.cc',
33       'layers/layer_iterator_unittest.cc',
34       'layers/layer_position_constraint_unittest.cc',
35       'layers/layer_unittest.cc',
36       'layers/layer_utils_unittest.cc',
37       'layers/nine_patch_layer_impl_unittest.cc',
38       'layers/nine_patch_layer_unittest.cc',
39       'layers/picture_image_layer_impl_unittest.cc',
40       'layers/picture_layer_impl_unittest.cc',
41       'layers/picture_layer_unittest.cc',
42       'layers/render_surface_unittest.cc',
43       'layers/scrollbar_layer_unittest.cc',
44       'layers/solid_color_layer_impl_unittest.cc',
45       'layers/texture_layer_unittest.cc',
46       'layers/tiled_layer_impl_unittest.cc',
47       'layers/tiled_layer_unittest.cc',
48       'layers/ui_resource_layer_impl_unittest.cc',
49       'layers/ui_resource_layer_unittest.cc',
50       'output/delegating_renderer_unittest.cc',
51       'output/filter_operations_unittest.cc',
52       'output/gl_renderer_unittest.cc',
53       'output/output_surface_unittest.cc',
54       'output/renderer_pixeltest.cc',
55       'output/shader_unittest.cc',
56       'output/software_renderer_unittest.cc',
57       'quads/draw_quad_unittest.cc',
58       'quads/render_pass_unittest.cc',
59       'resources/layer_quad_unittest.cc',
60       'resources/picture_layer_tiling_set_unittest.cc',
61       'resources/picture_layer_tiling_unittest.cc',
62       'resources/picture_pile_impl_unittest.cc',
63       'resources/picture_pile_unittest.cc',
64       'resources/picture_unittest.cc',
65       'resources/prioritized_resource_unittest.cc',
66       'resources/prioritized_tile_set_unittest.cc',
67       'resources/raster_worker_pool_unittest.cc',
68       'resources/resource_provider_unittest.cc',
69       'resources/resource_update_controller_unittest.cc',
70       'resources/scoped_resource_unittest.cc',
71       'resources/task_graph_runner_unittest.cc',
72       'resources/texture_mailbox_deleter_unittest.cc',
73       'resources/texture_uploader_unittest.cc',
74       'resources/tile_manager_unittest.cc',
75       'resources/video_resource_updater_unittest.cc',
76       'scheduler/delay_based_time_source_unittest.cc',
77       'scheduler/frame_rate_controller_unittest.cc',
78       'scheduler/scheduler_state_machine_unittest.cc',
79       'scheduler/scheduler_unittest.cc',
80       'test/layer_tree_json_parser_unittest.cc',
81       'test/test_web_graphics_context_3d_unittest.cc',
82       'trees/damage_tracker_unittest.cc',
83       'trees/layer_sorter_unittest.cc',
84       'trees/layer_tree_host_common_unittest.cc',
85       'trees/layer_tree_host_impl_unittest.cc',
86       'trees/layer_tree_host_pixeltest_blending.cc',
87       'trees/layer_tree_host_pixeltest_filters.cc',
88       'trees/layer_tree_host_pixeltest_masks.cc',
89       'trees/layer_tree_host_pixeltest_on_demand_raster.cc',
90       'trees/layer_tree_host_pixeltest_readback.cc',
91       'trees/layer_tree_host_unittest.cc',
92       'trees/layer_tree_host_unittest_animation.cc',
93       'trees/layer_tree_host_unittest_context.cc',
94       'trees/layer_tree_host_unittest_copyrequest.cc',
95       'trees/layer_tree_host_unittest_damage.cc',
96       'trees/layer_tree_host_unittest_delegated.cc',
97       'trees/layer_tree_host_unittest_occlusion.cc',
98       'trees/layer_tree_host_unittest_picture.cc',
99       'trees/layer_tree_host_unittest_pinch_zoom.cc',
100       'trees/layer_tree_host_unittest_scroll.cc',
101       'trees/layer_tree_host_unittest_video.cc',
102       'trees/occlusion_tracker_unittest.cc',
103       'trees/quad_culler_unittest.cc',
104       'trees/tree_synchronizer_unittest.cc',
105     ],
106     'cc_surfaces_unit_tests_source_files': [
107       'surfaces/surface_aggregator_test_helpers.cc',
108       'surfaces/surface_aggregator_test_helpers.h',
109       'surfaces/surface_aggregator_unittest.cc',
110       'surfaces/surface_unittest.cc',
111       'surfaces/surfaces_pixeltest.cc',
112     ],
113     'cc_tests_support_files': [
114       'test/animation_test_common.cc',
115       'test/animation_test_common.h',
116       'test/fake_content_layer.cc',
117       'test/fake_content_layer.h',
118       'test/fake_content_layer_client.cc',
119       'test/fake_content_layer_client.h',
120       'test/fake_content_layer_impl.cc',
121       'test/fake_content_layer_impl.h',
122       'test/fake_delegated_renderer_layer.cc',
123       'test/fake_delegated_renderer_layer.h',
124       'test/fake_delegated_renderer_layer_impl.cc',
125       'test/fake_delegated_renderer_layer_impl.h',
126       'test/fake_impl_proxy.h',
127       'test/fake_layer_tree_host.cc',
128       'test/fake_layer_tree_host.h',
129       'test/fake_layer_tree_host_client.cc',
130       'test/fake_layer_tree_host_client.h',
131       'test/fake_layer_tree_host_impl.cc',
132       'test/fake_layer_tree_host_impl.h',
133       'test/fake_layer_tree_host_impl_client.cc',
134       'test/fake_layer_tree_host_impl_client.h',
135       'test/fake_output_surface.cc',
136       'test/fake_output_surface.h',
137       'test/fake_output_surface_client.cc',
138       'test/fake_output_surface_client.h',
139       'test/fake_painted_scrollbar_layer.cc',
140       'test/fake_painted_scrollbar_layer.h',
141       'test/fake_picture_layer.cc',
142       'test/fake_picture_layer.h',
143       'test/fake_picture_layer_impl.cc',
144       'test/fake_picture_layer_impl.h',
145       'test/fake_picture_layer_tiling_client.cc',
146       'test/fake_picture_layer_tiling_client.h',
147       'test/fake_picture_pile_impl.cc',
148       'test/fake_picture_pile_impl.h',
149       'test/fake_proxy.cc',
150       'test/fake_proxy.h',
151       'test/fake_rendering_stats_instrumentation.h',
152       'test/fake_scoped_ui_resource.cc',
153       'test/fake_scoped_ui_resource.h',
154       'test/fake_scrollbar.cc',
155       'test/fake_scrollbar.h',
156       'test/fake_tile_manager.cc',
157       'test/fake_tile_manager.h',
158       'test/fake_tile_manager_client.cc',
159       'test/fake_tile_manager_client.h',
160       'test/fake_ui_resource_layer_tree_host_impl.cc',
161       'test/fake_ui_resource_layer_tree_host_impl.h',
162       'test/fake_video_frame_provider.cc',
163       'test/fake_video_frame_provider.h',
164       'test/geometry_test_utils.cc',
165       'test/geometry_test_utils.h',
166       'test/test_in_process_context_provider.cc',
167       'test/test_in_process_context_provider.h',
168       'test/impl_side_painting_settings.h',
169       'test/layer_test_common.cc',
170       'test/layer_test_common.h',
171       'test/layer_tree_json_parser.cc',
172       'test/layer_tree_json_parser.h',
173       'test/layer_tree_pixel_test.cc',
174       'test/layer_tree_pixel_test.h',
175       'test/layer_tree_test.cc',
176       'test/layer_tree_test.h',
177       'test/mock_quad_culler.cc',
178       'test/mock_quad_culler.h',
179       'test/occlusion_tracker_test_common.h',
180       'test/ordered_texture_map.cc',
181       'test/ordered_texture_map.h',
182       'test/paths.cc',
183       'test/paths.h',
184       'test/pixel_comparator.cc',
185       'test/pixel_comparator.h',
186       'test/pixel_test.cc',
187       'test/pixel_test.h',
188       'test/pixel_test_output_surface.cc',
189       'test/pixel_test_output_surface.h',
190       'test/pixel_test_software_output_device.cc',
191       'test/pixel_test_software_output_device.h',
192       'test/pixel_test_utils.cc',
193       'test/pixel_test_utils.h',
194       'test/render_pass_test_common.cc',
195       'test/render_pass_test_common.h',
196       'test/render_pass_test_utils.cc',
197       'test/render_pass_test_utils.h',
198       'test/scheduler_test_common.cc',
199       'test/scheduler_test_common.h',
200       'test/skia_common.cc',
201       'test/skia_common.h',
202       'test/solid_color_content_layer_client.cc',
203       'test/solid_color_content_layer_client.h',
204       'test/test_context_provider.cc',
205       'test/test_context_provider.h',
206       'test/test_context_support.cc',
207       'test/test_context_support.h',
208       'test/test_gles2_interface.cc',
209       'test/test_gles2_interface.h',
210       'test/test_texture.cc',
211       'test/test_texture.h',
212       'test/test_tile_priorities.cc',
213       'test/test_tile_priorities.h',
214       'test/test_web_graphics_context_3d.cc',
215       'test/test_web_graphics_context_3d.h',
216       'test/tiled_layer_test_common.cc',
217       'test/tiled_layer_test_common.h',
218     ],
219   },
220   'targets': [
221     {
222       'target_name': 'cc_unittests',
223       'type': '<(gtest_target_type)',
224       'dependencies': [
225         '../base/base.gyp:test_support_base',
226         '../gpu/gpu.gyp:gpu',
227         '../gpu/gpu.gyp:gpu_unittest_utils',
228         '../media/media.gyp:media',
229         '../skia/skia.gyp:skia',
230         '../testing/gmock.gyp:gmock',
231         '../testing/gtest.gyp:gtest',
232         '../ui/events/events.gyp:events_base',
233         '../ui/gfx/gfx.gyp:gfx',
234         '../ui/gfx/gfx.gyp:gfx_geometry',
235         'cc.gyp:cc',
236         'cc.gyp:cc_surfaces',
237         'cc_test_support',
238       ],
239       'sources': [
240         'test/run_all_unittests.cc',
241         'test/cc_test_suite.cc',
242         '<@(cc_unit_tests_source_files)',
243         '<@(cc_surfaces_unit_tests_source_files)',
244       ],
245       'include_dirs': [
246         'test',
247         '.',
248       ],
249       'conditions': [
250         ['OS == "android" and gtest_target_type == "shared_library"',
251           {
252             'dependencies': [
253               '../testing/android/native_test.gyp:native_test_native_code',
254             ],
255           }
256         ],
257         [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"',
258           {
259             'conditions': [
260               [ 'linux_use_tcmalloc==1',
261                 {
262                   'dependencies': [
263                     '../base/allocator/allocator.gyp:allocator',
264                   ],
265                 }
266               ],
267             ],
268           }
269         ],
270       ],
271       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
272       'msvs_disabled_warnings': [ 4267, ],
273     },
274     {
275       'target_name': 'cc_perftests',
276       'type': '<(gtest_target_type)',
277       'dependencies': [
278         '../base/base.gyp:test_support_base',
279         '../gpu/gpu.gyp:gpu',
280         '../gpu/gpu.gyp:gpu_unittest_utils',
281         '../media/media.gyp:media',
282         '../skia/skia.gyp:skia',
283         '../testing/gmock.gyp:gmock',
284         '../testing/gtest.gyp:gtest',
285         '../testing/perf/perf_test.gyp:*',
286         '../ui/gfx/gfx.gyp:gfx',
287         '../ui/gfx/gfx.gyp:gfx_geometry',
288         'cc.gyp:cc',
289         'cc_test_support',
290       ],
291       'sources': [
292         'layers/layer_perftest.cc',
293         'resources/picture_layer_tiling_perftest.cc',
294         'resources/raster_worker_pool_perftest.cc',
295         'resources/task_graph_runner_perftest.cc',
296         'resources/tile_manager_perftest.cc',
297         'test/cc_test_suite.cc',
298         'test/lap_timer.cc',
299         'test/run_all_perftests.cc',
300         'trees/layer_tree_host_common_perftest.cc',
301         'trees/layer_tree_host_perftest.cc',
302         'trees/occlusion_tracker_perftest.cc',
303       ],
304       'include_dirs': [
305         'test',
306         '.',
307       ],
308       'conditions': [
309         ['OS == "android" and gtest_target_type == "shared_library"',
310           {
311             'dependencies': [
312               '../testing/android/native_test.gyp:native_test_native_code',
313             ],
314           }
315         ],
316         # See http://crbug.com/162998#c4 for why this is needed.
317         ['OS=="linux" and linux_use_tcmalloc==1',
318           {
319             'dependencies': [
320               '../base/allocator/allocator.gyp:allocator',
321             ],
322           }
323         ],
324       ],
325       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
326       'msvs_disabled_warnings': [ 4267, ],
327     },
328     {
329       'target_name': 'cc_test_support',
330       'type': 'static_library',
331       'include_dirs': [
332         'test',
333         '.',
334         '..',
335       ],
336       'dependencies': [
337         '../base/base.gyp:base',
338         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
339         '../gpu/gpu.gyp:gles2_c_lib',
340         '../gpu/gpu.gyp:gles2_implementation',
341         '../gpu/gpu.gyp:gpu_unittest_utils',
342         '../gpu/skia_bindings/skia_bindings.gyp:gpu_skia_bindings',
343         '../skia/skia.gyp:skia',
344         '../testing/gmock.gyp:gmock',
345         '../testing/gtest.gyp:gtest',
346         '../third_party/mesa/mesa.gyp:osmesa',
347         '../ui/gfx/gfx.gyp:gfx',
348         '../ui/gfx/gfx.gyp:gfx_geometry',
349         '../ui/gfx/gfx.gyp:gfx_test_support',
350         '../ui/gl/gl.gyp:gl',
351       ],
352       'sources': [
353         '<@(cc_tests_support_files)',
354       ],
355       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
356       'msvs_disabled_warnings': [ 4267, ],
357     },
358   ],
359   'conditions': [
360     # Special target to wrap a gtest_target_type==shared_library
361     # cc_unittests into an android apk for execution.
362     ['OS == "android" and gtest_target_type == "shared_library"',
363       {
364         'targets': [
365           {
366             'target_name': 'cc_unittests_apk',
367             'type': 'none',
368             'dependencies': [
369               'cc_unittests',
370             ],
371             'variables': {
372               'test_suite_name': 'cc_unittests',
373               'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)cc_unittests<(SHARED_LIB_SUFFIX)',
374             },
375             'includes': [ '../build/apk_test.gypi' ],
376           },
377           {
378             'target_name': 'cc_perftests_apk',
379             'type': 'none',
380             'dependencies': [
381               'cc_perftests',
382             ],
383             'variables': {
384               'test_suite_name': 'cc_perftests',
385               'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)cc_perftests<(SHARED_LIB_SUFFIX)',
386             },
387             'includes': [ '../build/apk_test.gypi' ],
388           },
389         ],
390       }
391     ]
392   ],
393 }