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/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',
37 'type': 'static_library',
38 'includes': [ 'base/ime/ime_test_support.gypi' ],
40 # None of the sources in this target are built on iOS, resulting in
41 # link errors when building targets that depend on this target
42 # because the static library isn't found. If this target is changed
43 # to have sources that are built on iOS, the target should be changed
44 # to be of type static_library on all platforms.
46 # The cocoa files don't apply to iOS.
47 'sources/': [['exclude', 'cocoa']],
51 '../chromeos/chromeos.gyp:chromeos_test_support_without_gmock',
52 '../skia/skia.gyp:skia',
57 'base/test/ui_controls_mac.mm',
58 'base/test/ui_controls_win.cc',
64 'target_name': 'run_ui_unittests',
65 'type': 'static_library',
67 '../base/base.gyp:base',
68 '../base/base.gyp:test_support_base',
69 '../chrome/chrome_resources.gyp:packed_resources',
75 'test/run_all_unittests.cc',
79 'target_name': 'ui_unittests',
80 'type': '<(gtest_target_type)',
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_base',
93 'gfx/gfx.gyp:gfx_geometry_unittests',
94 'gfx/gfx.gyp:gfx_test_support',
95 'resources/ui_resources.gyp:ui_resources',
97 'shell_dialogs/shell_dialogs.gyp:shell_dialogs',
101 # iOS uses a small subset of ui. common_sources are the only files that
104 'base/layout_unittest.cc',
105 'base/l10n/l10n_util_mac_unittest.mm',
106 'base/l10n/l10n_util_unittest.cc',
107 'base/l10n/l10n_util_win_unittest.cc',
108 'base/l10n/time_format_unittest.cc',
109 'base/models/tree_node_iterator_unittest.cc',
110 'base/resource/data_pack_literal.cc',
111 'base/resource/data_pack_unittest.cc',
112 'base/resource/resource_bundle_unittest.cc',
113 'gfx/animation/animation_container_unittest.cc',
114 'gfx/animation/animation_unittest.cc',
115 'gfx/animation/multi_animation_unittest.cc',
116 'gfx/animation/slide_animation_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/range/range_mac_unittest.mm',
129 'gfx/range/range_unittest.cc',
130 'gfx/range/range_win_unittest.cc',
131 'gfx/screen_unittest.cc',
132 'gfx/shadow_value_unittest.cc',
133 'gfx/skbitmap_operations_unittest.cc',
134 'gfx/skrect_conversion_unittest.cc',
135 'gfx/text_elider_unittest.cc',
136 'gfx/text_utils_unittest.cc',
139 '<@(_common_sources)',
140 'base/accelerators/accelerator_manager_unittest.cc',
141 'base/accelerators/menu_label_accelerator_util_linux_unittest.cc',
142 'base/clipboard/clipboard_unittest.cc',
143 'base/clipboard/custom_data_helper_unittest.cc',
144 'base/cocoa/base_view_unittest.mm',
145 'base/cocoa/cocoa_event_utils_unittest.mm',
146 'base/cocoa/controls/blue_label_button_unittest.mm',
147 'base/cocoa/controls/hover_image_menu_button_unittest.mm',
148 'base/cocoa/controls/hyperlink_button_cell_unittest.mm',
149 'base/cocoa/focus_tracker_unittest.mm',
150 'base/cocoa/fullscreen_window_manager_unittest.mm',
151 'base/cocoa/hover_image_button_unittest.mm',
152 'base/cocoa/menu_controller_unittest.mm',
153 'base/cocoa/nsgraphics_context_additions_unittest.mm',
154 'base/cocoa/tracking_area_unittest.mm',
155 'base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc',
156 'base/gtk/gtk_expanded_container_unittest.cc',
157 'base/models/list_model_unittest.cc',
158 'base/models/list_selection_model_unittest.cc',
159 'base/models/tree_node_model_unittest.cc',
160 'base/test/data/resource.h',
161 'base/text/bytes_formatting_unittest.cc',
162 'base/view_prop_unittest.cc',
163 'base/webui/web_ui_util_unittest.cc',
164 'base/x/x11_util_unittest.cc',
165 'gfx/animation/tween_unittest.cc',
166 'gfx/blit_unittest.cc',
167 'gfx/break_list_unittest.cc',
168 'gfx/canvas_unittest.cc',
169 'gfx/canvas_unittest_mac.mm',
170 'gfx/codec/jpeg_codec_unittest.cc',
171 'gfx/color_analysis_unittest.cc',
172 'gfx/font_list_unittest.cc',
173 'gfx/image/image_mac_unittest.mm',
174 'gfx/image/image_util_unittest.cc',
175 'gfx/ozone/dri/hardware_display_controller_unittest.cc',
176 'gfx/ozone/dri/dri_surface_factory_unittest.cc',
177 'gfx/ozone/dri/dri_surface_unittest.cc',
178 'gfx/platform_font_mac_unittest.mm',
179 'gfx/render_text_unittest.cc',
180 'gfx/sequential_id_generator_unittest.cc',
181 'gfx/transform_util_unittest.cc',
182 'gfx/utf16_indexing_unittest.cc',
183 'shell_dialogs/select_file_dialog_win_unittest.cc',
190 'sources' : ['<@(_all_sources)'],
192 'base/ime/ime_unittests.gypi',
196 '<@(_common_sources)',
198 # The ResourceBundle unittest expects a locale.pak file to exist in
199 # the bundle for English-US. Copy it in from where it was generated
200 # by ui_strings.gyp:ui_unittest_strings.
201 'mac_bundle_resources': [
202 '<(PRODUCT_DIR)/ui_unittests_strings/en.lproj/locale.pak',
207 'test/ui_unittests.rc',
208 'base/dragdrop/os_exchange_data_win_unittest.cc',
209 'base/win/hwnd_subclass_unittest.cc',
210 'gfx/font_fallback_win_unittest.cc',
211 'gfx/icon_util_unittest.cc',
212 'gfx/platform_font_win_unittest.cc',
216 '../third_party/wtl/include',
224 'AdditionalDependencies': [
236 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
237 'msvs_disabled_warnings': [ 4267, ],
239 ['OS != "mac" and OS != "ios"', {
241 'gfx/transform_unittest.cc',
242 'gfx/interpolated_transform_unittest.cc',
245 ['OS == "android" and gtest_target_type == "shared_library"', {
247 '../testing/android/native_test.gyp:native_test_native_code',
250 ['desktop_linux == 1 or chromeos == 1 or OS == "ios"', {
252 'base/strings/ui_strings.gyp:ui_unittest_strings',
257 '../build/linux/system.gyp:fontconfig',
258 '../build/linux/system.gyp:pangocairo',
261 'gfx/platform_font_pango_unittest.cc',
264 ['linux_use_tcmalloc==1', {
266 '../base/allocator/allocator.gyp:allocator',
269 ['toolkit_views==1', {
271 'browser/ui/gtk/gtk_expanded_container_unittest.cc',
278 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
281 ['toolkit_uses_gtk == 1', {
283 'base/dragdrop/gtk_dnd_util_unittest.cc',
286 '../build/linux/system.gyp:gtk',
289 ['OS=="android" or OS=="ios"', {
291 'gfx/render_text_unittest.cc',
294 ['OS!="win" or use_aura==0', {
296 'base/view_prop_unittest.cc',
299 ['use_x11==1 and use_aura==1', {
301 'base/cursor/cursor_loader_x11_unittest.cc',
304 ['use_aura==1 or toolkit_views==1', {
306 'base/dragdrop/os_exchange_data_unittest.cc',
309 'events/events.gyp:events',
310 'events/events.gyp:events_base',
311 'events/events.gyp:events_test_support',
316 'base/dialogs/select_file_dialog_win_unittest.cc',
317 'base/dragdrop/os_exchange_data_win_unittest.cc',
318 'gfx/screen_unittest.cc',
323 '<(DEPTH)/build/linux/system.gyp:dridrm',
326 ['use_ozone==1 and use_pango==0', {
328 'gfx/text_elider_unittest.cc',
329 'gfx/font_unittest.cc',
330 'gfx/font_list_unittest.cc',
331 'gfx/render_text_unittest.cc',
332 'gfx/canvas_unittest.cc',
337 'base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc',
341 'target_conditions': [
344 # Pull in specific Mac files for iOS (which have been filtered out
345 # by file name rules).
346 ['include', '^base/l10n/l10n_util_mac_unittest\\.mm$'],
353 # Special target to wrap a gtest_target_type==shared_library
354 # ui_unittests into an android apk for execution.
355 # See base.gyp for TODO(jrg)s about this strategy.
356 ['OS == "android" and gtest_target_type == "shared_library"', {
359 'target_name': 'ui_unittests_apk',
365 'test_suite_name': 'ui_unittests',
366 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)ui_unittests<(SHARED_LIB_SUFFIX)',
368 'includes': [ '../build/apk_test.gypi' ],