Mandoline: Make TransferBufferManager RefCounted
[chromium-blink-merge.git] / cc / cc_tests.gyp
blobb115e3b6e70f66088460f16d376f2867f7809379
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_host_unittest.cc',
10       'animation/animation_player_unittest.cc',
11       'animation/animation_timeline_unittest.cc',
12       'animation/animation_unittest.cc',
13       'animation/element_animations_unittest.cc',
14       'animation/keyframed_animation_curve_unittest.cc',
15       'animation/layer_animation_controller_unittest.cc',
16       'animation/scroll_offset_animation_curve_unittest.cc',
17       'animation/scrollbar_animation_controller_linear_fade_unittest.cc',
18       'animation/scrollbar_animation_controller_thinning_unittest.cc',
19       'animation/transform_operations_unittest.cc',
20       'base/delayed_unique_notifier_unittest.cc',
21       'base/float_quad_unittest.cc',
22       'base/histograms_unittest.cc',
23       'base/list_container_unittest.cc',
24       'base/math_util_unittest.cc',
25       'base/region_unittest.cc',
26       'base/rolling_time_delta_history_unittest.cc',
27       'base/scoped_ptr_vector_unittest.cc',
28       'base/sidecar_list_container_unittest.cc',
29       'base/simple_enclosed_region_unittest.cc',
30       'base/tiling_data_unittest.cc',
31       'base/unique_notifier_unittest.cc',
32       'debug/frame_timing_tracker_unittest.cc',
33       'debug/micro_benchmark_controller_unittest.cc',
34       'debug/rendering_stats_unittest.cc',
35       'input/top_controls_manager_unittest.cc',
36       'layers/delegated_frame_provider_unittest.cc',
37       'layers/delegated_frame_resource_collection_unittest.cc',
38       'layers/delegated_renderer_layer_impl_unittest.cc',
39       'layers/delegated_renderer_layer_unittest.cc',
40       'layers/heads_up_display_layer_impl_unittest.cc',
41       'layers/heads_up_display_unittest.cc',
42       'layers/io_surface_layer_impl_unittest.cc',
43       'layers/layer_impl_unittest.cc',
44       'layers/layer_iterator_unittest.cc',
45       'layers/layer_position_constraint_unittest.cc',
46       'layers/layer_unittest.cc',
47       'layers/layer_utils_unittest.cc',
48       'layers/nine_patch_layer_impl_unittest.cc',
49       'layers/nine_patch_layer_unittest.cc',
50       'layers/painted_scrollbar_layer_impl_unittest.cc',
51       'layers/picture_image_layer_impl_unittest.cc',
52       'layers/picture_image_layer_unittest.cc',
53       'layers/picture_layer_impl_unittest.cc',
54       'layers/picture_layer_unittest.cc',
55       'layers/render_surface_impl_unittest.cc',
56       'layers/render_surface_unittest.cc',
57       'layers/scrollbar_layer_unittest.cc',
58       'layers/solid_color_layer_impl_unittest.cc',
59       'layers/solid_color_scrollbar_layer_impl_unittest.cc',
60       'layers/surface_layer_impl_unittest.cc',
61       'layers/surface_layer_unittest.cc',
62       'layers/texture_layer_impl_unittest.cc',
63       'layers/texture_layer_unittest.cc',
64       'layers/ui_resource_layer_impl_unittest.cc',
65       'layers/ui_resource_layer_unittest.cc',
66       'layers/video_frame_provider_client_impl_unittest.cc',
67       'layers/video_layer_impl_unittest.cc',
68       'output/begin_frame_args_unittest.cc',
69       'output/bsp_tree_unittest.cc',
70       'output/delegating_renderer_unittest.cc',
71       'output/filter_operations_unittest.cc',
72       'output/gl_renderer_unittest.cc',
73       'output/layer_quad_unittest.cc',
74       'output/output_surface_unittest.cc',
75       'output/overlay_unittest.cc',
76       'output/renderer_pixeltest.cc',
77       'output/renderer_unittest.cc',
78       'output/shader_unittest.cc',
79       'output/software_renderer_unittest.cc',
80       'output/texture_mailbox_deleter_unittest.cc',
81       'playback/display_item_list_unittest.cc',
82       'playback/display_list_raster_source_unittest.cc',
83       'playback/display_list_recording_source_unittest.cc',
84       'playback/picture_pile_impl_unittest.cc',
85       'playback/picture_pile_unittest.cc',
86       'playback/picture_unittest.cc',
87       'playback/pixel_ref_map_unittest.cc',
88       'playback/recording_source_unittest.cc',
89       'quads/draw_polygon_unittest.cc',
90       'quads/draw_quad_unittest.cc',
91       'quads/render_pass_unittest.cc',
92       'raster/scoped_gpu_raster_unittest.cc',
93       'raster/task_graph_runner_unittest.cc',
94       'raster/texture_compressor_etc1_unittest.cc',
95       'raster/tile_task_worker_pool_unittest.cc',
96       'resources/platform_color_unittest.cc',
97       'resources/resource_provider_unittest.cc',
98       'resources/scoped_resource_unittest.cc',
99       'resources/video_resource_updater_unittest.cc',
100       'scheduler/begin_frame_source_unittest.cc',
101       'scheduler/delay_based_time_source_unittest.cc',
102       'scheduler/scheduler_state_machine_unittest.cc',
103       'scheduler/scheduler_unittest.cc',
104       'test/layer_tree_json_parser_unittest.cc',
105       'test/ordered_simple_task_runner_unittest.cc',
106       'test/test_web_graphics_context_3d_unittest.cc',
107       'tiles/picture_layer_tiling_set_unittest.cc',
108       'tiles/picture_layer_tiling_unittest.cc',
109       'tiles/tile_manager_unittest.cc',
110       'tiles/tile_priority_unittest.cc',
111       'trees/blocking_task_runner_unittest.cc',
112       'trees/damage_tracker_unittest.cc',
113       'trees/layer_tree_host_common_unittest.cc',
114       'trees/layer_tree_host_impl_unittest.cc',
115       'trees/layer_tree_host_pixeltest_blending.cc',
116       'trees/layer_tree_host_pixeltest_filters.cc',
117       'trees/layer_tree_host_pixeltest_masks.cc',
118       'trees/layer_tree_host_pixeltest_readback.cc',
119       'trees/layer_tree_host_pixeltest_synchronous.cc',
120       'trees/layer_tree_host_pixeltest_tiles.cc',
121       'trees/layer_tree_host_unittest.cc',
122       'trees/layer_tree_host_unittest_animation.cc',
123       'trees/layer_tree_host_unittest_animation_timelines.cc',
124       'trees/layer_tree_host_unittest_context.cc',
125       'trees/layer_tree_host_unittest_copyrequest.cc',
126       'trees/layer_tree_host_unittest_damage.cc',
127       'trees/layer_tree_host_unittest_delegated.cc',
128       'trees/layer_tree_host_unittest_occlusion.cc',
129       'trees/layer_tree_host_unittest_picture.cc',
130       'trees/layer_tree_host_unittest_proxy.cc',
131       'trees/layer_tree_host_unittest_scroll.cc',
132       'trees/layer_tree_host_unittest_video.cc',
133       'trees/layer_tree_impl_unittest.cc',
134       'trees/occlusion_tracker_unittest.cc',
135       'trees/occlusion_unittest.cc',
136       'trees/property_tree_unittest.cc',
137       'trees/tree_synchronizer_unittest.cc',
138     ],
139     'cc_surfaces_unit_tests_source_files': [
140       'surfaces/display_unittest.cc',
141       'surfaces/display_scheduler_unittest.cc',
142       'surfaces/surface_aggregator_test_helpers.cc',
143       'surfaces/surface_aggregator_test_helpers.h',
144       'surfaces/surface_aggregator_unittest.cc',
145       'surfaces/surface_display_output_surface_unittest.cc',
146       'surfaces/surface_factory_unittest.cc',
147       'surfaces/surface_unittest.cc',
148       'surfaces/surfaces_pixeltest.cc',
149     ],
150     'cc_tests_support_files': [
151       'test/animation_test_common.cc',
152       'test/animation_test_common.h',
153       'test/animation_timelines_test_common.cc',
154       'test/animation_timelines_test_common.h',
155       'test/begin_frame_args_test.cc',
156       'test/begin_frame_args_test.h',
157       'test/failure_output_surface.cc',
158       'test/failure_output_surface.h',
159       'test/fake_content_layer_client.cc',
160       'test/fake_content_layer_client.h',
161       'test/fake_delegated_renderer_layer.cc',
162       'test/fake_delegated_renderer_layer.h',
163       'test/fake_delegated_renderer_layer_impl.cc',
164       'test/fake_delegated_renderer_layer_impl.h',
165       'test/fake_display_list_recording_source.h',
166       'test/fake_external_begin_frame_source.cc',
167       'test/fake_external_begin_frame_source.h',
168       'test/fake_impl_proxy.h',
169       'test/fake_layer_tree_host.cc',
170       'test/fake_layer_tree_host.h',
171       'test/fake_layer_tree_host_client.cc',
172       'test/fake_layer_tree_host_client.h',
173       'test/fake_layer_tree_host_impl.cc',
174       'test/fake_layer_tree_host_impl.h',
175       'test/fake_layer_tree_host_impl_client.cc',
176       'test/fake_layer_tree_host_impl_client.h',
177       'test/fake_output_surface.cc',
178       'test/fake_output_surface.h',
179       'test/fake_output_surface_client.cc',
180       'test/fake_output_surface_client.h',
181       'test/fake_painted_scrollbar_layer.cc',
182       'test/fake_painted_scrollbar_layer.h',
183       'test/fake_picture_layer.cc',
184       'test/fake_picture_layer.h',
185       'test/fake_picture_layer_impl.cc',
186       'test/fake_picture_layer_impl.h',
187       'test/fake_picture_layer_tiling_client.cc',
188       'test/fake_picture_layer_tiling_client.h',
189       'test/fake_picture_pile.cc',
190       'test/fake_picture_pile.h',
191       'test/fake_picture_pile_impl.cc',
192       'test/fake_picture_pile_impl.h',
193       'test/fake_proxy.cc',
194       'test/fake_proxy.h',
195       'test/fake_renderer_client.cc',
196       'test/fake_renderer_client.h',
197       'test/fake_rendering_stats_instrumentation.h',
198       'test/fake_resource_provider.h',
199       'test/fake_scoped_ui_resource.cc',
200       'test/fake_scoped_ui_resource.h',
201       'test/fake_scrollbar.cc',
202       'test/fake_scrollbar.h',
203       'test/fake_tile_manager.cc',
204       'test/fake_tile_manager.h',
205       'test/fake_tile_manager_client.cc',
206       'test/fake_tile_manager_client.h',
207       'test/fake_ui_resource_layer_tree_host_impl.cc',
208       'test/fake_ui_resource_layer_tree_host_impl.h',
209       'test/fake_video_frame_provider.cc',
210       'test/fake_video_frame_provider.h',
211       'test/geometry_test_utils.cc',
212       'test/geometry_test_utils.h',
213       'test/layer_test_common.cc',
214       'test/layer_test_common.h',
215       'test/layer_tree_host_common_test.cc',
216       'test/layer_tree_host_common_test.h',
217       'test/layer_tree_json_parser.cc',
218       'test/layer_tree_json_parser.h',
219       'test/layer_tree_pixel_resource_test.cc',
220       'test/layer_tree_pixel_resource_test.h',
221       'test/layer_tree_pixel_test.cc',
222       'test/layer_tree_pixel_test.h',
223       'test/layer_tree_test.cc',
224       'test/layer_tree_test.h',
225       'test/mock_occlusion_tracker.h',
226       'test/ordered_simple_task_runner.cc',
227       'test/ordered_simple_task_runner.h',
228       'test/ordered_texture_map.cc',
229       'test/ordered_texture_map.h',
230       'test/paths.cc',
231       'test/paths.h',
232       'test/pixel_comparator.cc',
233       'test/pixel_comparator.h',
234       'test/pixel_test.cc',
235       'test/pixel_test.h',
236       'test/pixel_test_output_surface.cc',
237       'test/pixel_test_output_surface.h',
238       'test/pixel_test_software_output_device.cc',
239       'test/pixel_test_software_output_device.h',
240       'test/pixel_test_utils.cc',
241       'test/pixel_test_utils.h',
242       'test/render_pass_test_common.cc',
243       'test/render_pass_test_common.h',
244       'test/render_pass_test_utils.cc',
245       'test/render_pass_test_utils.h',
246       'test/scheduler_test_common.cc',
247       'test/scheduler_test_common.h',
248       'test/skia_common.cc',
249       'test/skia_common.h',
250       'test/solid_color_content_layer_client.cc',
251       'test/solid_color_content_layer_client.h',
252       'test/test_context_provider.cc',
253       'test/test_context_provider.h',
254       'test/test_context_support.cc',
255       'test/test_context_support.h',
256       'test/test_gles2_interface.cc',
257       'test/test_gles2_interface.h',
258       'test/test_gpu_memory_buffer_manager.cc',
259       'test/test_gpu_memory_buffer_manager.h',
260       'test/test_image_factory.cc',
261       'test/test_image_factory.h',
262       'test/test_in_process_context_provider.cc',
263       'test/test_in_process_context_provider.h',
264       'test/test_occlusion_tracker.h',
265       'test/test_shared_bitmap_manager.cc',
266       'test/test_shared_bitmap_manager.h',
267       'test/test_task_graph_runner.cc',
268       'test/test_task_graph_runner.h',
269       'test/test_texture.cc',
270       'test/test_texture.h',
271       'test/test_tile_priorities.cc',
272       'test/test_tile_priorities.h',
273       'test/test_web_graphics_context_3d.cc',
274       'test/test_web_graphics_context_3d.h',
275     ],
276   },
277   'targets': [
278     {
279       'target_name': 'cc_unittests',
280       'type': '<(gtest_target_type)',
281       'dependencies': [
282         '../base/base.gyp:test_support_base',
283         '../gpu/command_buffer/command_buffer.gyp:gles2_utils',
284         '../gpu/gpu.gyp:gpu',
285         '../gpu/gpu.gyp:gpu_unittest_utils',
286         '../media/media.gyp:media',
287         '../skia/skia.gyp:skia',
288         '../testing/gmock.gyp:gmock',
289         '../testing/gtest.gyp:gtest',
290         '../ui/events/events.gyp:events_base',
291         '../ui/gfx/gfx.gyp:gfx',
292         '../ui/gfx/gfx.gyp:gfx_geometry',
293         'cc.gyp:cc',
294         'cc.gyp:cc_surfaces',
295         'cc_test_support',
296       ],
297       'sources': [
298         'test/cc_test_suite.cc',
299         'test/run_all_unittests.cc',
300         '<@(cc_unit_tests_source_files)',
301         '<@(cc_surfaces_unit_tests_source_files)',
302       ],
303       'include_dirs': [
304         'test',
305         '.',
306       ],
307       'conditions': [
308         ['OS == "android"',
309           {
310             'dependencies': [
311               '../testing/android/native_test.gyp:native_test_native_code',
312             ],
313           }
314         ],
315         [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"',
316           {
317             'conditions': [
318               [ 'use_allocator!="none"',
319                 {
320                   'dependencies': [
321                     '../base/allocator/allocator.gyp:allocator',
322                   ],
323                 }
324               ],
325             ],
326           }
327         ],
328       ],
329     },
330     {
331       # GN version: //cc/cc_perftests
332       'target_name': 'cc_perftests',
333       'type': '<(gtest_target_type)',
334       'dependencies': [
335         '../base/base.gyp:test_support_base',
336         '../gpu/command_buffer/command_buffer.gyp:gles2_utils',
337         '../gpu/gpu.gyp:gpu',
338         '../gpu/gpu.gyp:gpu_unittest_utils',
339         '../media/media.gyp:media',
340         '../skia/skia.gyp:skia',
341         '../testing/gmock.gyp:gmock',
342         '../testing/gtest.gyp:gtest',
343         '../testing/perf/perf_test.gyp:*',
344         '../ui/gfx/gfx.gyp:gfx',
345         '../ui/gfx/gfx.gyp:gfx_geometry',
346         'cc.gyp:cc',
347         'cc.gyp:cc_surfaces',
348         'cc_test_support',
349       ],
350       'sources': [
351         # Note: sources list duplicated in GN build.
352         'layers/layer_perftest.cc',
353         'layers/picture_layer_impl_perftest.cc',
354         'playback/picture_pile_impl_perftest.cc',
355         'quads/draw_quad_perftest.cc',
356         'raster/task_graph_runner_perftest.cc',
357         'raster/texture_compressor_perftest.cc',
358         'raster/tile_task_worker_pool_perftest.cc',
359         'surfaces/surface_aggregator_perftest.cc',
360         'test/cc_test_suite.cc',
361         'test/run_all_perftests.cc',
362         'tiles/picture_layer_tiling_perftest.cc',
363         'tiles/tile_manager_perftest.cc',
364         'trees/layer_tree_host_common_perftest.cc',
365         'trees/layer_tree_host_perftest.cc',
366         'trees/occlusion_tracker_perftest.cc',
367       ],
368       'include_dirs': [
369         'test',
370         '.',
371       ],
372       'conditions': [
373         ['OS == "android"',
374           {
375             'dependencies': [
376               '../testing/android/native_test.gyp:native_test_native_code',
377             ],
378           }
379         ],
380         # See http://crbug.com/162998#c4 for why this is needed.
381         ['OS=="linux" and use_allocator!="none"',
382           {
383             'dependencies': [
384               '../base/allocator/allocator.gyp:allocator',
385             ],
386           }
387         ],
388       ],
389     },
390     {
391       'target_name': 'cc_test_support',
392       'type': 'static_library',
393       'include_dirs': [
394         'test',
395         '.',
396         '..',
397       ],
398       'dependencies': [
399         '../base/base.gyp:base',
400         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
401         '../gpu/command_buffer/command_buffer.gyp:gles2_utils',
402         '../gpu/gpu.gyp:gles2_c_lib',
403         '../gpu/gpu.gyp:gles2_implementation',
404         '../gpu/gpu.gyp:gl_in_process_context',
405         '../gpu/gpu.gyp:gpu',
406         '../gpu/gpu.gyp:gpu_unittest_utils',
407         '../gpu/skia_bindings/skia_bindings.gyp:gpu_skia_bindings',
408         '../skia/skia.gyp:skia',
409         '../testing/gmock.gyp:gmock',
410         '../testing/gtest.gyp:gtest',
411         '../third_party/mesa/mesa.gyp:osmesa',
412         '../ui/gfx/gfx.gyp:gfx',
413         '../ui/gfx/gfx.gyp:gfx_geometry',
414         '../ui/gfx/gfx.gyp:gfx_test_support',
415         '../ui/gl/gl.gyp:gl',
416       ],
417       'sources': [
418         '<@(cc_tests_support_files)',
419       ],
420     },
421   ],
422   'conditions': [
423     ['OS == "android"',
424       {
425         'targets': [
426           {
427             'target_name': 'cc_unittests_apk',
428             'type': 'none',
429             'dependencies': [
430               'cc_unittests',
431             ],
432             'variables': {
433               'test_suite_name': 'cc_unittests',
434             },
435             'includes': [ '../build/apk_test.gypi' ],
436           },
437           {
438             'target_name': 'cc_perftests_apk',
439             'type': 'none',
440             'dependencies': [
441               'cc_perftests',
442             ],
443             'variables': {
444               'test_suite_name': 'cc_perftests',
445             },
446             'includes': [ '../build/apk_test.gypi' ],
447           },
448         ],
449       }
450     ],
451     ['test_isolation_mode != "noop"', {
452       'targets': [
453         {
454           'target_name': 'cc_unittests_run',
455           'type': 'none',
456           'dependencies': [
457             'cc_unittests',
458           ],
459           'includes': [
460             '../build/isolate.gypi',
461           ],
462           'sources': [
463             'cc_unittests.isolate',
464           ],
465           'conditions': [
466             # crbug.com/464062 xdisplaycheck is used to run cc_unittests_run on
467             # the linux try bots when using X11.
468             ['OS=="linux" and use_ozone==0',
469               {
470                 'dependencies': [
471                   '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
472                 ],
473               }
474             ],
475           ],
476         },
477       ],
478     }],
479   ],