Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / ui / gfx / gfx_tests.gyp
blob710a3d5104694bedf307bb6848bb012079c2b539
1 # Copyright 2014 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   },
9   'targets': [
10     {
11       'target_name': 'gfx_unittests',
12       'type': '<(gtest_target_type)',
13       # iOS uses a small subset of ui. common_sources are the only files that
14       # are built on iOS.
15       'common_sources' : [
16         'font_unittest.cc',
17         'image/image_family_unittest.cc',
18         'image/image_skia_unittest.cc',
19         'image/image_unittest.cc',
20         'image/image_unittest_util.cc',
21         'image/image_unittest_util.h',
22         'image/image_unittest_util_ios.mm',
23         'image/image_unittest_util_mac.mm',
24         'screen_unittest.cc',
25         'test/run_all_unittests.cc',
26         'text_elider_unittest.cc',
27         'text_utils_unittest.cc',
28       ],
29       'all_sources': [
30         '<@(_common_sources)',
31         'animation/animation_container_unittest.cc',
32         'animation/animation_unittest.cc',
33         'animation/multi_animation_unittest.cc',
34         'animation/slide_animation_unittest.cc',
35         'animation/tween_unittest.cc',
36         'blit_unittest.cc',
37         'break_list_unittest.cc',
38         'canvas_unittest.cc',
39         'canvas_unittest_mac.mm',
40         'codec/jpeg_codec_unittest.cc',
41         'codec/png_codec_unittest.cc',
42         'color_analysis_unittest.cc',
43         'color_utils_unittest.cc',
44         'display_change_notifier_unittest.cc',
45         'display_unittest.cc',
46         'font_list_unittest.cc',
47         'geometry/box_unittest.cc',
48         'geometry/cubic_bezier_unittest.cc',
49         'geometry/insets_unittest.cc',
50         'geometry/matrix3_unittest.cc',
51         'geometry/point_unittest.cc',
52         'geometry/point3_unittest.cc',
53         'geometry/quad_unittest.cc',
54         'geometry/r_tree_unittest.cc',
55         'geometry/rect_unittest.cc',
56         'geometry/safe_integer_conversions_unittest.cc',
57         'geometry/size_unittest.cc',
58         'geometry/vector2d_unittest.cc',
59         'geometry/vector3d_unittest.cc',
60         'image/image_mac_unittest.mm',
61         'image/image_util_unittest.cc',
62         'mac/coordinate_conversion_unittest.mm',
63         'platform_font_mac_unittest.mm',
64         'range/range_mac_unittest.mm',
65         'range/range_unittest.cc',
66         'range/range_win_unittest.cc',
67         'render_text_unittest.cc',
68         'sequential_id_generator_unittest.cc',
69         'shadow_value_unittest.cc',
70         'skbitmap_operations_unittest.cc',
71         'skrect_conversion_unittest.cc',
72         'transform_util_unittest.cc',
73         'utf16_indexing_unittest.cc',
74       ],
75       'dependencies': [
76         '../../base/base.gyp:base',
77         '../../base/base.gyp:test_support_base',
78         '../../skia/skia.gyp:skia',
79         '../../testing/gtest.gyp:gtest',
80         '../../third_party/libpng/libpng.gyp:libpng',
81         '../base/ui_base.gyp:ui_base',
82         '../resources/ui_resources.gyp:ui_test_pak',
83         'gfx.gyp:gfx',
84         'gfx.gyp:gfx_geometry',
85         'gfx.gyp:gfx_test_support',
86       ],
87       'conditions': [
88         ['OS == "ios"', {
89           'sources': ['<@(_common_sources)'],
90         }, {  # OS != "ios"
91           'sources': ['<@(_all_sources)'],
92         }],
93         ['OS == "win"', {
94           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
95           'msvs_disabled_warnings': [ 4267, ],
96         }],
97         ['OS != "mac" and OS != "ios"', {
98           'sources': [
99             'transform_unittest.cc',
100             'interpolated_transform_unittest.cc',
101           ],
102         }],
103         ['use_pango == 1', {
104           'dependencies': [
105             '../../build/linux/system.gyp:fontconfig',
106             '../../build/linux/system.gyp:pangocairo',
107           ],
108           'sources': [
109             'font_render_params_linux_unittest.cc',
110             'platform_font_pango_unittest.cc',
111           ],
112           'conditions': [
113             ['use_allocator!="none"', {
114               'dependencies': [
115                 '../../base/allocator/allocator.gyp:allocator',
116               ],
117             }],
118           ],
119         }],
120         ['use_ozone==1 and use_pango==0', {
121           'sources!': [
122             'canvas_unittest.cc',
123             'font_list_unittest.cc',
124             'font_unittest.cc',
125             'render_text_unittest.cc',
126             'text_elider_unittest.cc',
127           ],
128         }],
129         ['OS == "android"', {
130           'dependencies': [
131             '../../testing/android/native_test.gyp:native_test_native_code',
132           ],
133           # Do not run display_change_notifier_unittest.cc on Android because it
134           # does not compile display_observer.cc
135           'sources!': [
136             'display_change_notifier_unittest.cc',
137           ],
138         }],
139         ['OS=="android" or OS=="ios"', {
140           'sources!': [
141             'render_text_unittest.cc',
142           ],
143         }],
144         ['use_aura==1', {
145           'sources!': [
146             'screen_unittest.cc',
147           ],
148         }],
149         ['OS == "win"', {
150           'sources': [
151             'color_profile_win_unittest.cc',
152             'font_fallback_win_unittest.cc',
153             'icon_util_unittest.cc',
154             'icon_util_unittests.rc',
155             'platform_font_win_unittest.cc',
156           ],
157           'msvs_settings': {
158             'VCLinkerTool': {
159               'DelayLoadDLLs': [
160                 'd2d1.dll',
161                 'd3d10_1.dll',
162               ],
163               'AdditionalDependencies': [
164                 'd2d1.lib',
165                 'd3d10_1.lib',
166               ],
167             },
168           },
169           'link_settings': {
170             'libraries': [
171               '-limm32.lib',
172               '-loleacc.lib',
173             ],
174           },
175           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
176           'msvs_disabled_warnings': [ 4267, ],
177         }],
178       ],
179     }
180   ],
181   'conditions': [
182     ['OS == "android"', {
183       'targets': [
184         {
185           'target_name': 'gfx_unittests_apk',
186           'type': 'none',
187           'dependencies': [
188             '../android/ui_android.gyp:ui_java',
189             'gfx_unittests',
190           ],
191           'variables': {
192             'test_suite_name': 'gfx_unittests',
193           },
194           'includes': [ '../../build/apk_test.gypi' ],
195         },
196       ],
197     }],
198   ],