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