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