cryptohome: Remove unnecessary include of mock_cryptohome_library.h
[chromium-blink-merge.git] / ui / ui_unittests.gypi
blob3cd74770d90bacf1af6dde4534accbb9dfec2273
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   'targets': [
7     {
8       'target_name': 'ui_test_support',
9       'dependencies': [
10         '../base/base.gyp:base',
11         '../skia/skia.gyp:skia',
12         '../testing/gtest.gyp:gtest',
13       ],
14       'sources': [
15         'base/test/cocoa_test_event_utils.h',
16         'base/test/cocoa_test_event_utils.mm',
17         'base/test/ui_cocoa_test_helper.h',
18         'base/test/ui_cocoa_test_helper.mm',
19         'base/test/ui_controls.h',
20         'base/test/ui_controls_aura.cc',
21         'base/test/ui_controls_gtk.cc',
22         'base/test/ui_controls_internal_win.cc',
23         'base/test/ui_controls_internal_win.h',
24         'base/test/ui_controls_mac.mm',
25         'base/test/ui_controls_win.cc',
26       ],
27       'include_dirs': [
28         '../',
29       ],
30       'conditions': [
31         ['OS!="ios"', {
32           'type': 'static_library',
33           'includes': [ 'base/ime/ime_test_support.gypi' ],
34         }, {  # OS=="ios"
35           # None of the sources in this target are built on iOS, resulting in
36           # link errors when building targets that depend on this target
37           # because the static library isn't found. If this target is changed
38           # to have sources that are built on iOS, the target should be changed
39           # to be of type static_library on all platforms.
40           'type': 'none',
41           # The cocoa files don't apply to iOS.
42           'sources/': [['exclude', 'cocoa']],
43         }],
44         ['chromeos==1', {
45           'dependencies': [
46             '../chromeos/chromeos.gyp:chromeos_test_support_without_gmock',
47             '../skia/skia.gyp:skia',
48           ],
49         }],
50         ['use_aura==1', {
51           'sources!': [
52             'base/test/ui_controls_win.cc',
53           ],
54         }],
55       ],
56     },
57     {
58       'target_name': 'run_ui_unittests',
59       'type': 'static_library',
60       'dependencies': [
61         '../base/base.gyp:base',
62         '../base/base.gyp:test_support_base',
63         'ui',
64       ],
65       'sources': [
66         'test/test_suite.cc',
67         'test/test_suite.h',
68         'test/run_all_unittests.cc',
69       ],
70     },
71     {
72       'target_name': 'ui_unittests',
73       'type': '<(gtest_target_type)',
74       'dependencies': [
75         '../base/base.gyp:base',
76         '../base/base.gyp:test_support_base',
77         '../skia/skia.gyp:skia',
78         '../testing/gmock.gyp:gmock',
79         '../testing/gtest.gyp:gtest',
80         '../third_party/icu/icu.gyp:icui18n',
81         '../third_party/icu/icu.gyp:icuuc',
82         '../third_party/libpng/libpng.gyp:libpng',
83         '../url/url.gyp:url_lib',
84         'base/strings/ui_strings.gyp:ui_strings',
85         'keycode_converter',
86         'run_ui_unittests',
87         'shell_dialogs',
88         'ui',
89         'ui_resources',
90         'ui_test_support',
91       ],
92       # iOS uses a small subset of ui. common_sources are the only files that
93       # are built on iOS.
94       'common_sources' : [
95         'base/layout_unittest.cc',
96         'base/l10n/l10n_util_mac_unittest.mm',
97         'base/l10n/l10n_util_unittest.cc',
98         'base/l10n/l10n_util_win_unittest.cc',
99         'base/l10n/time_format_unittest.cc',
100         'base/models/tree_node_iterator_unittest.cc',
101         'base/resource/data_pack_literal.cc',
102         'base/resource/data_pack_unittest.cc',
103         'base/resource/resource_bundle_unittest.cc',
104         'gfx/animation/animation_container_unittest.cc',
105         'gfx/animation/animation_unittest.cc',
106         'gfx/animation/multi_animation_unittest.cc',
107         'gfx/animation/slide_animation_unittest.cc',
108         'gfx/box_unittest.cc',
109         'gfx/codec/png_codec_unittest.cc',
110         'gfx/color_utils_unittest.cc',
111         'gfx/display_unittest.cc',
112         'gfx/font_unittest.cc',
113         'gfx/image/image_family_unittest.cc',
114         'gfx/image/image_skia_unittest.cc',
115         'gfx/image/image_unittest.cc',
116         'gfx/image/image_unittest_util.cc',
117         'gfx/image/image_unittest_util.h',
118         'gfx/image/image_unittest_util_ios.mm',
119         'gfx/image/image_unittest_util_mac.mm',
120         'gfx/insets_unittest.cc',
121         'gfx/matrix3_unittest.cc',
122         'gfx/point_unittest.cc',
123         'gfx/point3_unittest.cc',
124         'gfx/quad_unittest.cc',
125         'gfx/range/range_mac_unittest.mm',
126         'gfx/range/range_unittest.cc',
127         'gfx/range/range_win_unittest.cc',
128         'gfx/rect_unittest.cc',
129         'gfx/safe_integer_conversions_unittest.cc',
130         'gfx/screen_unittest.cc',
131         'gfx/shadow_value_unittest.cc',
132         'gfx/size_unittest.cc',
133         'gfx/skbitmap_operations_unittest.cc',
134         'gfx/text_elider_unittest.cc',
135         'gfx/text_utils_unittest.cc',
136         'gfx/vector2d_unittest.cc',
137         'gfx/vector3d_unittest.cc',
138       ],
139       'all_sources': [
140         '<@(_common_sources)',
141         'base/accelerators/accelerator_manager_unittest.cc',
142         'base/accelerators/menu_label_accelerator_util_linux_unittest.cc',
143         'base/clipboard/clipboard_unittest.cc',
144         'base/clipboard/custom_data_helper_unittest.cc',
145         'base/cocoa/base_view_unittest.mm',
146         'base/cocoa/cocoa_event_utils_unittest.mm',
147         'base/cocoa/controls/hover_image_menu_button_unittest.mm',
148         'base/cocoa/controls/hyperlink_button_cell_unittest.mm',
149         'base/cocoa/events_mac_unittest.mm',
150         'base/cocoa/focus_tracker_unittest.mm',
151         'base/cocoa/fullscreen_window_manager_unittest.mm',
152         'base/cocoa/hover_image_button_unittest.mm',
153         'base/cocoa/menu_controller_unittest.mm',
154         'base/cocoa/nsgraphics_context_additions_unittest.mm',
155         'base/cocoa/tracking_area_unittest.mm',
156         'base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc',
157         'base/gtk/gtk_expanded_container_unittest.cc',
158         'base/gtk/gtk_im_context_util_unittest.cc',
159         'base/keycodes/keycode_converter_unittest.cc',
160         'base/models/list_model_unittest.cc',
161         'base/models/list_selection_model_unittest.cc',
162         'base/models/tree_node_model_unittest.cc',
163         'base/sequential_id_generator_unittest.cc',
164         'base/test/data/resource.h',
165         'base/text/bytes_formatting_unittest.cc',
166         'base/view_prop_unittest.cc',
167         'events/event_dispatcher_unittest.cc',
168         'events/event_unittest.cc',
169         'events/latency_info_unittest.cc',
170         'events/ozone/evdev/touch_event_converter_ozone_unittest.cc',
171         'gfx/blit_unittest.cc',
172         'gfx/break_list_unittest.cc',
173         'gfx/canvas_unittest.cc',
174         'gfx/canvas_unittest_mac.mm',
175         'gfx/codec/jpeg_codec_unittest.cc',
176         'gfx/color_analysis_unittest.cc',
177         'gfx/font_list_unittest.cc',
178         'gfx/image/image_mac_unittest.mm',
179         'gfx/image/image_util_unittest.cc',
180         'gfx/platform_font_mac_unittest.mm',
181         'gfx/render_text_unittest.cc',
182         'gfx/transform_util_unittest.cc',
183         'gfx/utf16_indexing_unittest.cc',
184         'shell_dialogs/select_file_dialog_win_unittest.cc',
185         'webui/web_ui_util_unittest.cc',
186       ],
187       'include_dirs': [
188         '../',
189       ],
190       'conditions': [
191         ['OS!="ios"', {
192           'sources' : ['<@(_all_sources)'],
193           'includes': [
194             'base/ime/ime_unittests.gypi',
195           ],
196         }, {  # OS=="ios"
197           'sources' : [
198             '<@(_common_sources)',
199           ],
200           # The ResourceBundle unittest expects a locale.pak file to exist in
201           # the bundle for English-US. Copy it in from where it was generated
202           # by ui_strings.gyp:ui_unittest_strings.
203           'mac_bundle_resources': [
204             '<(PRODUCT_DIR)/ui_unittests_strings/en.lproj/locale.pak',
205           ],
206         }],
207         ['OS == "win"', {
208           'sources': [
209             'test/ui_unittests.rc',
210             'base/dragdrop/os_exchange_data_win_unittest.cc',
211             'base/win/hwnd_subclass_unittest.cc',
212             'gfx/font_fallback_win_unittest.cc',
213             'gfx/icon_util_unittest.cc',
214             'gfx/platform_font_win_unittest.cc',
215           ],
216           'include_dirs': [
217             '../..',
218             '../third_party/wtl/include',
219           ],
220           'msvs_settings': {
221             'VCLinkerTool': {
222               'DelayLoadDLLs': [
223                 'd2d1.dll',
224                 'd3d10_1.dll',
225               ],
226               'AdditionalDependencies': [
227                 'd2d1.lib',
228                 'd3d10_1.lib',
229               ],
230             },
231           },
232           'link_settings': {
233             'libraries': [
234               '-limm32.lib',
235               '-loleacc.lib',
236             ],
237           },
238           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
239           'msvs_disabled_warnings': [ 4267, ],
240         }],
241         ['OS == "linux" and toolkit_views==1', {
242           'sources': [
243             'events/x/events_x_unittest.cc',
244           ],
245         }],
246         ['OS != "mac" and OS != "ios"', {
247           'sources': [
248             'gfx/transform_unittest.cc',
249             'gfx/interpolated_transform_unittest.cc',
250           ],
251         }],
252         ['OS == "android" and gtest_target_type == "shared_library"', {
253           'dependencies': [
254             '../testing/android/native_test.gyp:native_test_native_code',
255           ],
256         }],
257         ['use_glib == 1 or OS == "ios"', {
258           'dependencies': [
259             'base/strings/ui_strings.gyp:ui_unittest_strings',
260           ],
261         }],
262         ['use_pango == 1', {
263           'dependencies': [
264             '../build/linux/system.gyp:fontconfig',
265             '../build/linux/system.gyp:pangocairo',
266           ],
267           'sources': [
268             'gfx/platform_font_pango_unittest.cc',
269           ],
270           'conditions': [
271             ['linux_use_tcmalloc==1', {
272                'dependencies': [
273                  '../base/allocator/allocator.gyp:allocator',
274                ],
275             }],
276             ['toolkit_views==1', {
277               'sources!': [
278                 'browser/ui/gtk/gtk_expanded_container_unittest.cc',
279               ],
280             }],
281           ],
282         }],
283         ['use_x11==1', {
284           'dependencies': [
285             '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
286           ],
287         }],
288         ['toolkit_uses_gtk == 1', {
289           'sources': [
290             'base/dragdrop/gtk_dnd_util_unittest.cc',
291           ],
292           'dependencies': [
293             '../build/linux/system.gyp:gtk',
294           ],
295         }],
296         ['OS=="android" or OS=="ios"', {
297           'sources!': [
298             'gfx/render_text_unittest.cc',
299           ],
300         }],
301         ['OS!="win" or use_aura==0', {
302           'sources!': [
303             'base/view_prop_unittest.cc',
304           ],
305         }],
306         ['use_x11==1 and use_aura==1',  {
307           'sources': [
308             'base/cursor/cursor_loader_x11_unittest.cc',
309           ],
310         }],
311         ['use_aura==1 or toolkit_views==1',  {
312           'sources': [
313             'base/dragdrop/os_exchange_data_unittest.cc',
314             'events/gestures/velocity_calculator_unittest.cc',
315           ],
316         }, {
317           'sources!': [
318             'events/event_dispatcher_unittest.cc',
319             'events/event_unittest.cc',
320           ],
321         }],
322         ['use_aura==1', {
323           'sources!': [
324             'base/dialogs/select_file_dialog_win_unittest.cc',
325             'base/dragdrop/os_exchange_data_win_unittest.cc',
326             'gfx/screen_unittest.cc',
327           ],
328         }],
329         ['chromeos==1', {
330           'sources!': [
331             'base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc',
332           ],
333         }],
334       ],
335       'target_conditions': [
336         ['OS == "ios"', {
337           'sources/': [
338             # Pull in specific Mac files for iOS (which have been filtered out
339             # by file name rules).
340             ['include', '^base/l10n/l10n_util_mac_unittest\\.mm$'],
341           ],
342         }],
343       ],
344     },
345   ],
346   'conditions': [
347     # Special target to wrap a gtest_target_type==shared_library
348     # ui_unittests into an android apk for execution.
349     # See base.gyp for TODO(jrg)s about this strategy.
350     ['OS == "android" and gtest_target_type == "shared_library"', {
351       'targets': [
352         {
353           'target_name': 'ui_unittests_apk',
354           'type': 'none',
355           'dependencies': [
356             'ui_unittests',
357           ],
358           'variables': {
359             'test_suite_name': 'ui_unittests',
360             'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)ui_unittests<(SHARED_LIB_SUFFIX)',
361           },
362           'includes': [ '../build/apk_test.gypi' ],
363         },
364       ],
365     }],
366   ],