[safe_browsing] Remove unused ContainsBrowseUrl() parameter.
[chromium-blink-merge.git] / ui / ui_unittests.gyp
blob63c0c9844cd2e5e294da87e34f84df93e4d87697
1 # Copyright 2013 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': 'ui_unittests',
12       'type': '<(gtest_target_type)',
13       'dependencies': [
14         '../base/base.gyp:base',
15         '../base/base.gyp:test_support_base',
16         '../skia/skia.gyp:skia',
17         '../testing/gmock.gyp:gmock',
18         '../testing/gtest.gyp:gtest',
19         '../third_party/icu/icu.gyp:icui18n',
20         '../third_party/icu/icu.gyp:icuuc',
21         '../url/url.gyp:url_lib',
22         'base/strings/ui_strings.gyp:ui_strings',
23         'base/ui_base.gyp:ui_base',
24         'base/ui_base.gyp:ui_base_test_support',
25         'events/events.gyp:events_base',
26         'gfx/gfx.gyp:gfx_test_support',
27         'resources/ui_resources.gyp:ui_resources',
28         'resources/ui_resources.gyp:ui_test_pak',
29       ],
30       # iOS uses a small subset of ui. common_sources are the only files that
31       # are built on iOS.
32       'common_sources' : [
33         'base/layout_unittest.cc',
34         'base/l10n/l10n_util_mac_unittest.mm',
35         'base/l10n/l10n_util_unittest.cc',
36         'base/l10n/l10n_util_win_unittest.cc',
37         'base/l10n/time_format_unittest.cc',
38         'base/models/tree_node_iterator_unittest.cc',
39         'base/resource/data_pack_literal.cc',
40         'base/resource/data_pack_unittest.cc',
41         'base/resource/resource_bundle_unittest.cc',
42         'base/test/run_all_unittests.cc',
43         'gfx/font_unittest.cc',
44         'gfx/image/image_family_unittest.cc',
45         'gfx/image/image_skia_unittest.cc',
46         'gfx/image/image_unittest.cc',
47         'gfx/image/image_unittest_util.cc',
48         'gfx/image/image_unittest_util.h',
49         'gfx/image/image_unittest_util_ios.mm',
50         'gfx/image/image_unittest_util_mac.mm',
51         'gfx/screen_unittest.cc',
52         'gfx/text_elider_unittest.cc',
53         'gfx/text_utils_unittest.cc',
54       ],
55       'all_sources': [
56         '<@(_common_sources)',
57         'base/accelerators/accelerator_manager_unittest.cc',
58         'base/accelerators/menu_label_accelerator_util_linux_unittest.cc',
59         'base/clipboard/clipboard_unittest.cc',
60         'base/clipboard/custom_data_helper_unittest.cc',
61         'base/cocoa/base_view_unittest.mm',
62         'base/cocoa/cocoa_base_utils_unittest.mm',
63         'base/cocoa/controls/blue_label_button_unittest.mm',
64         'base/cocoa/controls/hover_image_menu_button_unittest.mm',
65         'base/cocoa/controls/hyperlink_button_cell_unittest.mm',
66         'base/cocoa/focus_tracker_unittest.mm',
67         'base/cocoa/fullscreen_window_manager_unittest.mm',
68         'base/cocoa/hover_image_button_unittest.mm',
69         'base/cocoa/menu_controller_unittest.mm',
70         'base/cocoa/nsgraphics_context_additions_unittest.mm',
71         'base/cocoa/tracking_area_unittest.mm',
72         'base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc',
73         'base/models/list_model_unittest.cc',
74         'base/models/list_selection_model_unittest.cc',
75         'base/models/tree_node_model_unittest.cc',
76         'base/test/data/resource.h',
77         'base/text/bytes_formatting_unittest.cc',
78         'base/view_prop_unittest.cc',
79         'base/webui/web_ui_util_unittest.cc',
80         'gfx/animation/tween_unittest.cc',
81         'gfx/blit_unittest.cc',
82         'gfx/break_list_unittest.cc',
83         'gfx/canvas_unittest.cc',
84         'gfx/canvas_unittest_mac.mm',
85         'gfx/codec/jpeg_codec_unittest.cc',
86         'gfx/color_analysis_unittest.cc',
87         'gfx/font_list_unittest.cc',
88         'gfx/image/image_mac_unittest.mm',
89         'gfx/image/image_util_unittest.cc',
90         'gfx/platform_font_mac_unittest.mm',
91         'gfx/render_text_unittest.cc',
92         'gfx/sequential_id_generator_unittest.cc',
93         'gfx/transform_util_unittest.cc',
94         'gfx/utf16_indexing_unittest.cc',
95       ],
96       'includes': [
97         'display/display_unittests.gypi',
98         'ozone/ozone_unittests.gypi',
99       ],
100       'include_dirs': [
101         '../',
102       ],
103       'conditions': [
104         ['OS!="ios"', {
105           'sources' : ['<@(_all_sources)'],
106           'includes': [
107             'base/ime/ime_unittests.gypi',
108           ],
109         }, {  # OS=="ios"
110           'sources' : [
111             '<@(_common_sources)',
112           ],
113           # The ResourceBundle unittest expects a locale.pak file to exist in
114           # the bundle for English-US. Copy it in from where it was generated
115           # by ui_resources.gyp:ui_test_pak.
116           'mac_bundle_resources': [
117             '<(PRODUCT_DIR)/ui/en.lproj/locale.pak',
118           ],
119         }],
120         ['OS == "win"', {
121           'sources': [
122             'base/dragdrop/os_exchange_data_win_unittest.cc',
123             'base/win/hwnd_subclass_unittest.cc',
124             'gfx/font_fallback_win_unittest.cc',
125             'gfx/icon_util_unittest.cc',
126             'gfx/icon_util_unittests.rc',
127             'gfx/platform_font_win_unittest.cc',
128           ],
129           'include_dirs': [
130             '../..',
131             '../third_party/wtl/include',
132           ],
133           'msvs_settings': {
134             'VCLinkerTool': {
135               'DelayLoadDLLs': [
136                 'd2d1.dll',
137                 'd3d10_1.dll',
138               ],
139               'AdditionalDependencies': [
140                 'd2d1.lib',
141                 'd3d10_1.lib',
142               ],
143             },
144           },
145           'link_settings': {
146             'libraries': [
147               '-limm32.lib',
148               '-loleacc.lib',
149             ],
150           },
151           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
152           'msvs_disabled_warnings': [ 4267, ],
153         }],
154         ['OS == "android"', {
155           'sources': [
156             'gfx/android/scroller_unittest.cc',
157           ],
158         }],
159         ['OS == "android" and gtest_target_type == "shared_library"', {
160           'dependencies': [
161             '../testing/android/native_test.gyp:native_test_native_code',
162           ],
163         }],
164         ['use_pango == 1', {
165           'dependencies': [
166             '../build/linux/system.gyp:fontconfig',
167             '../build/linux/system.gyp:pangocairo',
168           ],
169           'sources': [
170             'gfx/platform_font_pango_unittest.cc',
171           ],
172           'conditions': [
173             # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
174             ['(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)', {
175                'dependencies': [
176                  '../base/allocator/allocator.gyp:allocator',
177                ],
178             }],
179           ],
180         }],
181         ['use_x11==1', {
182           'dependencies': [
183             '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
184           ],
185         }],
186         ['OS=="android" or OS=="ios"', {
187           'sources!': [
188             'gfx/render_text_unittest.cc',
189           ],
190         }],
191         ['OS!="win" or use_aura==0', {
192           'sources!': [
193             'base/view_prop_unittest.cc',
194           ],
195         }],
196         ['use_x11==1 and use_aura==1',  {
197           'sources': [
198             'base/cursor/cursor_loader_x11_unittest.cc',
199           ],
200         }],
201         ['OS=="mac"',  {
202           'dependencies': [
203             'events/events.gyp:events_test_support',
204             'gfx/gfx.gyp:gfx_test_support',
205             'ui_unittests_bundle',
206           ],
207         }],
208         ['use_aura==1 or toolkit_views==1',  {
209           'sources': [
210             'base/dragdrop/os_exchange_data_unittest.cc',
211           ],
212           'dependencies': [
213             'events/events.gyp:events',
214             'events/events.gyp:events_base',
215             'events/events.gyp:events_test_support',
216           ],
217         }],
218         ['use_aura==1', {
219           'sources!': [
220             'base/dragdrop/os_exchange_data_win_unittest.cc',
221             'gfx/screen_unittest.cc',
222           ],
223         }],
224         ['use_ozone==1 and use_pango==0', {
225           'sources!': [
226             'gfx/text_elider_unittest.cc',
227             'gfx/font_unittest.cc',
228             'gfx/font_list_unittest.cc',
229             'gfx/render_text_unittest.cc',
230             'gfx/canvas_unittest.cc',
231           ],
232         }],
233         ['chromeos==1', {
234           'dependencies': [
235             '../chromeos/chromeos.gyp:chromeos',
236           ],
237           'sources!': [
238             'base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc',
239           ],
240         }],
241       ],
242       'target_conditions': [
243         ['OS == "ios"', {
244           'sources/': [
245             # Pull in specific Mac files for iOS (which have been filtered out
246             # by file name rules).
247             ['include', '^base/l10n/l10n_util_mac_unittest\\.mm$'],
248           ],
249         }],
250       ],
251     },
252   ],
253   'conditions': [
254     # Mac target to build a test Framework bundle to mock out resource loading.
255     ['OS == "mac"', {
256       'targets': [
257         {
258           'target_name': 'ui_unittests_bundle',
259           'type': 'shared_library',
260           'dependencies': [
261             'resources/ui_resources.gyp:ui_test_pak',
262           ],
263           'includes': [ 'ui_unittests_bundle.gypi' ],
264         },
265       ],
266     }],
267     # Special target to wrap a gtest_target_type==shared_library
268     # ui_unittests into an android apk for execution.
269     # See base.gyp for TODO(jrg)s about this strategy.
270     ['OS == "android" and gtest_target_type == "shared_library"', {
271       'targets': [
272         {
273           'target_name': 'ui_unittests_apk',
274           'type': 'none',
275           'dependencies': [
276             'ui_unittests',
277           ],
278           'variables': {
279             'test_suite_name': 'ui_unittests',
280           },
281           'includes': [ '../build/apk_test.gypi' ],
282         },
283       ],
284     }],
285   ],