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.
11 'target_name': 'ui_test_support',
13 '../base/base.gyp:base',
14 '../skia/skia.gyp:skia',
15 '../testing/gtest.gyp:gtest',
17 'gfx/gfx.gyp:gfx_geometry',
20 'base/test/ui_controls.h',
21 'base/test/ui_controls_aura.cc',
22 'base/test/ui_controls_gtk.cc',
23 'base/test/ui_controls_internal_win.cc',
24 'base/test/ui_controls_internal_win.h',
25 'base/test/ui_controls_mac.mm',
26 'base/test/ui_controls_win.cc',
33 'type': 'static_library',
34 'includes': [ 'base/ime/ime_test_support.gypi' ],
36 # None of the sources in this target are built on iOS, resulting in
37 # link errors when building targets that depend on this target
38 # because the static library isn't found. If this target is changed
39 # to have sources that are built on iOS, the target should be changed
40 # to be of type static_library on all platforms.
42 # The cocoa files don't apply to iOS.
43 'sources/': [['exclude', 'cocoa']],
47 '../chromeos/chromeos.gyp:chromeos_test_support_without_gmock',
48 '../skia/skia.gyp:skia',
53 'base/test/ui_controls_mac.mm',
54 'base/test/ui_controls_win.cc',
60 'target_name': 'ui_unittests',
61 'type': '<(gtest_target_type)',
63 '../base/base.gyp:base',
64 '../base/base.gyp:test_support_base',
65 '../chrome/chrome_resources.gyp:packed_resources',
66 '../skia/skia.gyp:skia',
67 '../testing/gmock.gyp:gmock',
68 '../testing/gtest.gyp:gtest',
69 '../third_party/icu/icu.gyp:icui18n',
70 '../third_party/icu/icu.gyp:icuuc',
71 '../third_party/libpng/libpng.gyp:libpng',
72 '../url/url.gyp:url_lib',
73 'base/strings/ui_strings.gyp:ui_strings',
74 'events/events.gyp:events_base',
75 'gfx/gfx.gyp:gfx_geometry_unittests',
76 'gfx/gfx.gyp:gfx_test_support',
77 'resources/ui_resources.gyp:ui_resources',
81 # iOS uses a small subset of ui. common_sources are the only files that
84 'base/layout_unittest.cc',
85 'base/l10n/l10n_util_mac_unittest.mm',
86 'base/l10n/l10n_util_unittest.cc',
87 'base/l10n/l10n_util_win_unittest.cc',
88 'base/l10n/time_format_unittest.cc',
89 'base/models/tree_node_iterator_unittest.cc',
90 'base/resource/data_pack_literal.cc',
91 'base/resource/data_pack_unittest.cc',
92 'base/resource/resource_bundle_unittest.cc',
93 'base/test/run_all_unittests.cc',
94 'gfx/animation/animation_container_unittest.cc',
95 'gfx/animation/animation_unittest.cc',
96 'gfx/animation/multi_animation_unittest.cc',
97 'gfx/animation/slide_animation_unittest.cc',
98 'gfx/codec/png_codec_unittest.cc',
99 'gfx/color_utils_unittest.cc',
100 'gfx/display_unittest.cc',
101 'gfx/font_unittest.cc',
102 'gfx/image/image_family_unittest.cc',
103 'gfx/image/image_skia_unittest.cc',
104 'gfx/image/image_unittest.cc',
105 'gfx/image/image_unittest_util.cc',
106 'gfx/image/image_unittest_util.h',
107 'gfx/image/image_unittest_util_ios.mm',
108 'gfx/image/image_unittest_util_mac.mm',
109 'gfx/range/range_mac_unittest.mm',
110 'gfx/range/range_unittest.cc',
111 'gfx/range/range_win_unittest.cc',
112 'gfx/screen_unittest.cc',
113 'gfx/shadow_value_unittest.cc',
114 'gfx/skbitmap_operations_unittest.cc',
115 'gfx/skrect_conversion_unittest.cc',
116 'gfx/text_elider_unittest.cc',
117 'gfx/text_utils_unittest.cc',
120 '<@(_common_sources)',
121 'base/accelerators/accelerator_manager_unittest.cc',
122 'base/accelerators/menu_label_accelerator_util_linux_unittest.cc',
123 'base/clipboard/clipboard_unittest.cc',
124 'base/clipboard/custom_data_helper_unittest.cc',
125 'base/cocoa/base_view_unittest.mm',
126 'base/cocoa/cocoa_base_utils_unittest.mm',
127 'base/cocoa/controls/blue_label_button_unittest.mm',
128 'base/cocoa/controls/hover_image_menu_button_unittest.mm',
129 'base/cocoa/controls/hyperlink_button_cell_unittest.mm',
130 'base/cocoa/focus_tracker_unittest.mm',
131 'base/cocoa/fullscreen_window_manager_unittest.mm',
132 'base/cocoa/hover_image_button_unittest.mm',
133 'base/cocoa/menu_controller_unittest.mm',
134 'base/cocoa/nsgraphics_context_additions_unittest.mm',
135 'base/cocoa/tracking_area_unittest.mm',
136 'base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc',
137 'base/gtk/gtk_expanded_container_unittest.cc',
138 'base/models/list_model_unittest.cc',
139 'base/models/list_selection_model_unittest.cc',
140 'base/models/tree_node_model_unittest.cc',
141 'base/test/data/resource.h',
142 'base/text/bytes_formatting_unittest.cc',
143 'base/view_prop_unittest.cc',
144 'base/webui/web_ui_util_unittest.cc',
145 'base/x/x11_util_unittest.cc',
146 'gfx/animation/tween_unittest.cc',
147 'gfx/blit_unittest.cc',
148 'gfx/break_list_unittest.cc',
149 'gfx/canvas_unittest.cc',
150 'gfx/canvas_unittest_mac.mm',
151 'gfx/codec/jpeg_codec_unittest.cc',
152 'gfx/color_analysis_unittest.cc',
153 'gfx/font_list_unittest.cc',
154 'gfx/image/image_mac_unittest.mm',
155 'gfx/image/image_util_unittest.cc',
156 'gfx/ozone/dri/hardware_display_controller_unittest.cc',
157 'gfx/ozone/dri/dri_surface_factory_unittest.cc',
158 'gfx/ozone/dri/dri_surface_unittest.cc',
159 'gfx/platform_font_mac_unittest.mm',
160 'gfx/render_text_unittest.cc',
161 'gfx/sequential_id_generator_unittest.cc',
162 'gfx/transform_util_unittest.cc',
163 'gfx/utf16_indexing_unittest.cc',
170 'sources' : ['<@(_all_sources)'],
172 'base/ime/ime_unittests.gypi',
176 '<@(_common_sources)',
178 # The ResourceBundle unittest expects a locale.pak file to exist in
179 # the bundle for English-US. Copy it in from where it was generated
180 # by ui_strings.gyp:ui_unittest_strings.
181 'mac_bundle_resources': [
182 '<(PRODUCT_DIR)/ui_unittests_strings/en.lproj/locale.pak',
187 'base/dragdrop/os_exchange_data_win_unittest.cc',
188 'base/win/hwnd_subclass_unittest.cc',
189 'gfx/font_fallback_win_unittest.cc',
190 'gfx/icon_util_unittest.cc',
191 'gfx/icon_util_unittests.rc',
192 'gfx/platform_font_win_unittest.cc',
196 '../third_party/wtl/include',
204 'AdditionalDependencies': [
216 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
217 'msvs_disabled_warnings': [ 4267, ],
219 ['OS != "mac" and OS != "ios"', {
221 'gfx/transform_unittest.cc',
222 'gfx/interpolated_transform_unittest.cc',
225 ['OS == "android"', {
227 'gfx/android/scroller_unittest.cc',
230 ['OS == "android" and gtest_target_type == "shared_library"', {
232 '../testing/android/native_test.gyp:native_test_native_code',
235 ['desktop_linux == 1 or chromeos == 1 or OS == "ios"', {
237 'base/strings/ui_strings.gyp:ui_unittest_strings',
242 '../build/linux/system.gyp:fontconfig',
243 '../build/linux/system.gyp:pangocairo',
246 'gfx/platform_font_pango_unittest.cc',
249 # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
250 ['(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)', {
252 '../base/allocator/allocator.gyp:allocator',
259 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
262 ['toolkit_uses_gtk == 1', {
264 'base/dragdrop/gtk_dnd_util_unittest.cc',
267 '../build/linux/system.gyp:gtk',
270 ['OS=="android" or OS=="ios"', {
272 'gfx/render_text_unittest.cc',
275 ['OS!="win" or use_aura==0', {
277 'base/view_prop_unittest.cc',
280 ['use_x11==1 and use_aura==1', {
282 'base/cursor/cursor_loader_x11_unittest.cc',
287 'events/events.gyp:events_test_support',
288 'gfx/gfx.gyp:gfx_test_support',
291 ['use_aura==1 or toolkit_views==1', {
293 'base/dragdrop/os_exchange_data_unittest.cc',
296 'events/events.gyp:events',
297 'events/events.gyp:events_base',
298 'events/events.gyp:events_test_support',
303 'base/dragdrop/os_exchange_data_win_unittest.cc',
304 'gfx/screen_unittest.cc',
309 '<(DEPTH)/build/linux/system.gyp:dridrm',
312 ['use_ozone==1 and use_pango==0', {
314 'gfx/text_elider_unittest.cc',
315 'gfx/font_unittest.cc',
316 'gfx/font_list_unittest.cc',
317 'gfx/render_text_unittest.cc',
318 'gfx/canvas_unittest.cc',
323 'base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc',
327 'target_conditions': [
330 # Pull in specific Mac files for iOS (which have been filtered out
331 # by file name rules).
332 ['include', '^base/l10n/l10n_util_mac_unittest\\.mm$'],
339 # Special target to wrap a gtest_target_type==shared_library
340 # ui_unittests into an android apk for execution.
341 # See base.gyp for TODO(jrg)s about this strategy.
342 ['OS == "android" and gtest_target_type == "shared_library"', {
345 'target_name': 'ui_unittests_apk',
351 'test_suite_name': 'ui_unittests',
352 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)ui_unittests<(SHARED_LIB_SUFFIX)',
354 'includes': [ '../build/apk_test.gypi' ],