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