Webkit roll 143935:143980
[chromium-blink-merge.git] / cc / cc_tests.gyp
blob1361914c706547a63598b9ed28646884d1851478
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   'variables': {
7     'chromium_code': 0,
8     'cc_unit_tests_source_files': [
9       'animation_unittest.cc',
10       'content_layer_unittest.cc',
11       'contents_scaling_layer_unittest.cc',
12       'damage_tracker_unittest.cc',
13       'delay_based_time_source_unittest.cc',
14       'delegated_renderer_layer_impl_unittest.cc',
15       'delegating_renderer_unittest.cc',
16       'draw_quad_unittest.cc',
17       'float_quad_unittest.cc',
18       'frame_rate_controller_unittest.cc',
19       'gl_renderer_unittest.cc',
20       'gl_renderer_pixeltest.cc',
21       'hash_pair_unittest.cc',
22       'heads_up_display_unittest.cc',
23       'keyframed_animation_curve_unittest.cc',
24       'layer_animation_controller_unittest.cc',
25       'layer_impl_unittest.cc',
26       'layer_iterator_unittest.cc',
27       'layer_quad_unittest.cc',
28       'layer_sorter_unittest.cc',
29       'layer_tree_host_common_unittest.cc',
30       'layer_tree_host_impl_unittest.cc',
31       'layer_tree_host_unittest.cc',
32       'layer_tree_host_unittest_animation.cc',
33       'layer_tree_host_unittest_context.cc',
34       'layer_tree_host_unittest_occlusion.cc',
35       'layer_tree_host_unittest_scroll.cc',
36       'layer_unittest.cc',
37       'math_util_unittest.cc',
38       'nine_patch_layer_impl_unittest.cc',
39       'nine_patch_layer_unittest.cc',
40       'occlusion_tracker_unittest.cc',
41       'picture_layer_impl_unittest.cc',
42       'picture_layer_tiling_set_unittest.cc',
43       'picture_layer_tiling_unittest.cc',
44       'prioritized_resource_unittest.cc',
45       'quad_culler_unittest.cc',
46       'region_unittest.cc',
47       'render_pass_unittest.cc',
48       'render_surface_filters_unittest.cc',
49       'render_surface_unittest.cc',
50       'resource_provider_unittest.cc',
51       'resource_update_controller_unittest.cc',
52       'scheduler_state_machine_unittest.cc',
53       'scheduler_unittest.cc',
54       'scoped_resource_unittest.cc',
55       'scrollbar_animation_controller_linear_fade_unittest.cc',
56       'scrollbar_layer_unittest.cc',
57       'software_renderer_unittest.cc',
58       'solid_color_layer_impl_unittest.cc',
59       'texture_copier_unittest.cc',
60       'texture_layer_unittest.cc',
61       'texture_uploader_unittest.cc',
62       'tile_priority_unittest.cc',
63       'tiled_layer_impl_unittest.cc',
64       'tiled_layer_unittest.cc',
65       'tiling_data_unittest.cc',
66       'top_controls_manager_unittest.cc',
67       'transform_operations_unittest.cc',
68       'tree_synchronizer_unittest.cc',
69       'timing_function_unittest.cc',
70       'test/fake_web_graphics_context_3d_unittest.cc',
71       'vsync_time_source_unittest.cc',
72     ],
73     'cc_tests_support_files': [
74       'test/animation_test_common.cc',
75       'test/animation_test_common.h',
76       'test/fake_content_layer.cc',
77       'test/fake_content_layer.h',
78       'test/fake_content_layer_client.cc',
79       'test/fake_content_layer_client.h',
80       'test/fake_content_layer_impl.cc',
81       'test/fake_content_layer_impl.h',
82       'test/fake_context_provider.cc',
83       'test/fake_context_provider.h',
84       'test/fake_impl_proxy.h',
85       'test/fake_output_surface.h',
86       'test/fake_layer_tree_host_client.cc',
87       'test/fake_layer_tree_host_client.h',
88       'test/fake_layer_tree_host_impl.cc',
89       'test/fake_layer_tree_host_impl_client.cc',
90       'test/fake_layer_tree_host_impl_client.h',
91       'test/fake_layer_tree_host_impl.h',
92       'test/fake_picture_layer_tiling_client.cc',
93       'test/fake_picture_layer_tiling_client.h',
94       'test/fake_proxy.cc',
95       'test/fake_proxy.h',
96       'test/fake_scrollbar_layer.cc',
97       'test/fake_scrollbar_layer.h',
98       'test/fake_scrollbar_theme_painter.h',
99       'test/fake_scrollbar_theme_painter.cc',
100       'test/fake_tile_manager_client.h',
101       'test/fake_output_surface.cc',
102       'test/fake_output_surface.h',
103       'test/fake_software_output_device.cc',
104       'test/fake_software_output_device.h',
105       'test/fake_video_frame_provider.cc',
106       'test/fake_video_frame_provider.h',
107       'test/fake_web_scrollbar.cc',
108       'test/fake_web_scrollbar.h',
109       'test/fake_web_scrollbar_theme_geometry.cc',
110       'test/fake_web_scrollbar_theme_geometry.h',
111       'test/geometry_test_utils.cc',
112       'test/geometry_test_utils.h',
113       'test/layer_test_common.cc',
114       'test/layer_test_common.h',
115       'test/layer_tree_test_common.cc',
116       'test/layer_tree_test_common.h',
117       'test/layer_tree_json_parser.cc',
118       'test/layer_tree_json_parser.h',
119       'test/mock_quad_culler.cc',
120       'test/mock_quad_culler.h',
121       'test/occlusion_tracker_test_common.h',
122       'test/paths.cc',
123       'test/paths.h',
124       'test/render_pass_test_common.cc',
125       'test/render_pass_test_common.h',
126       'test/render_pass_test_utils.cc',
127       'test/render_pass_test_utils.h',
128       'test/scheduler_test_common.cc',
129       'test/scheduler_test_common.h',
130       'test/test_web_graphics_context_3d.cc',
131       'test/test_web_graphics_context_3d.h',
132       'test/tiled_layer_test_common.cc',
133       'test/tiled_layer_test_common.h',
134     ],
135   },
136   'targets': [
137     {
138       'target_name': 'cc_unittests',
139       'type': '<(gtest_target_type)',
140       'dependencies': [
141         '../base/base.gyp:test_support_base',
142         '../media/media.gyp:media',
143         '../skia/skia.gyp:skia',
144         '../testing/gmock.gyp:gmock',
145         '../testing/gtest.gyp:gtest',
146         '../ui/ui.gyp:ui',
147         '../webkit/support/webkit_support.gyp:webkit_gpu',
148         'cc.gyp:cc',
149         'cc_test_support',
150         'cc_test_utils',
151       ],
152       'sources': [
153         'test/run_all_unittests.cc',
154         'test/cc_test_suite.cc',
155         '<@(cc_unit_tests_source_files)',
156       ],
157       'include_dirs': [
158         'test',
159         '.',
160         '../third_party/WebKit/Source/Platform/chromium',
161       ],
162       'conditions': [
163         ['OS == "android" and gtest_target_type == "shared_library"', {
164           'dependencies': [
165             '../testing/android/native_test.gyp:native_test_native_code',
166           ],
167         }],
168         [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
169           'conditions': [
170             [ 'linux_use_tcmalloc==1', {
171               'dependencies': [
172                 '../base/allocator/allocator.gyp:allocator',
173               ],
174             }],
175           ],
176         }],
177       ],
178       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
179       'msvs_disabled_warnings': [ 4267, ],
180     },
181     {
182       'target_name': 'cc_perftests',
183       'type': '<(gtest_target_type)',
184       'dependencies': [
185         '../base/base.gyp:test_support_base',
186         '../media/media.gyp:media',
187         '../skia/skia.gyp:skia',
188         '../testing/gmock.gyp:gmock',
189         '../testing/gtest.gyp:gtest',
190         '../ui/ui.gyp:ui',
191         'cc.gyp:cc',
192         'cc_test_support',
193       ],
194       'sources': [
195         'layer_tree_host_perftest.cc',
196         'test/run_all_unittests.cc',
197         'test/cc_test_suite.cc',
198       ],
199       'include_dirs': [
200         'test',
201         '.',
202         '../third_party/WebKit/Source/Platform/chromium',
203       ],
204       'conditions': [
205         ['OS == "android" and gtest_target_type == "shared_library"', {
206           'dependencies': [
207             '../testing/android/native_test.gyp:native_test_native_code',
208           ],
209         }],
210       ],
211       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
212       'msvs_disabled_warnings': [ 4267, ],
213     },
214     {
215       'target_name': 'cc_test_support',
216       'type': 'static_library',
217       'include_dirs': [
218         'test',
219         '.',
220         '..',
221         '../third_party/WebKit/Source/Platform/chromium',
222       ],
223       'dependencies': [
224         '../skia/skia.gyp:skia',
225         '../testing/gmock.gyp:gmock',
226         '../testing/gtest.gyp:gtest',
227         '../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit',
228         '../third_party/mesa/mesa.gyp:osmesa',
229         '../ui/gl/gl.gyp:gl',
230         '../ui/ui.gyp:ui',
231       ],
232       'sources': [
233         '<@(cc_tests_support_files)',
234       ],
235       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
236       'msvs_disabled_warnings': [ 4267, ],
237     },
238     {
239       'target_name': 'cc_test_utils',
240       'type': 'static_library',
241       'include_dirs': [
242         '..'
243       ],
244       'sources': [
245         'test/pixel_test_utils.cc',
246         'test/pixel_test_utils.h',
247       ],
248       'dependencies': [
249         '../skia/skia.gyp:skia',
250         '../ui/ui.gyp:ui',  # for png_codec
251       ],
252     },
253   ],
254   'conditions': [
255     # Special target to wrap a gtest_target_type==shared_library
256     # cc_unittests into an android apk for execution.
257     ['OS == "android" and gtest_target_type == "shared_library"', {
258       'targets': [
259         {
260           'target_name': 'cc_unittests_apk',
261           'type': 'none',
262           'dependencies': [
263             'cc_unittests',
264           ],
265           'variables': {
266             'test_suite_name': 'cc_unittests',
267             'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)cc_unittests<(SHARED_LIB_SUFFIX)',
268           },
269           'includes': [ '../build/apk_test.gypi' ],
270         },
271         {
272           'target_name': 'cc_perftests_apk',
273           'type': 'none',
274           'dependencies': [
275             'cc_perftests',
276           ],
277           'variables': {
278             'test_suite_name': 'cc_perftests',
279             'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)cc_perftests<(SHARED_LIB_SUFFIX)',
280           },
281           'includes': [ '../build/apk_test.gypi' ],
282         },
283       ],
284     }]
285   ],