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.
8 'target_name': 'ui_test_support',
10 '../base/base.gyp:base',
11 '../skia/skia.gyp:skia',
12 '../testing/gtest.gyp:gtest',
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',
32 'type': 'static_library',
33 'includes': [ 'base/ime/ime_test_support.gypi' ],
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.
41 # The cocoa files don't apply to iOS.
42 'sources/': [['exclude', 'cocoa']],
46 '../chromeos/chromeos.gyp:chromeos_test_support_without_gmock',
47 '../skia/skia.gyp:skia',
52 'base/test/ui_controls_win.cc',
58 'target_name': 'run_ui_unittests',
59 'type': 'static_library',
61 '../base/base.gyp:base',
62 '../base/base.gyp:test_support_base',
68 'test/run_all_unittests.cc',
72 'target_name': 'ui_unittests',
73 'type': '<(gtest_target_type)',
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',
92 # iOS uses a small subset of ui. common_sources are the only files that
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',
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',
192 'sources' : ['<@(_all_sources)'],
194 'base/ime/ime_unittests.gypi',
198 '<@(_common_sources)',
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',
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',
218 '../third_party/wtl/include',
226 'AdditionalDependencies': [
238 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
239 'msvs_disabled_warnings': [ 4267, ],
241 ['OS == "linux" and toolkit_views==1', {
243 'events/x/events_x_unittest.cc',
246 ['OS != "mac" and OS != "ios"', {
248 'gfx/transform_unittest.cc',
249 'gfx/interpolated_transform_unittest.cc',
252 ['OS == "android" and gtest_target_type == "shared_library"', {
254 '../testing/android/native_test.gyp:native_test_native_code',
257 ['use_glib == 1 or OS == "ios"', {
259 'base/strings/ui_strings.gyp:ui_unittest_strings',
264 '../build/linux/system.gyp:fontconfig',
265 '../build/linux/system.gyp:pangocairo',
268 'gfx/platform_font_pango_unittest.cc',
271 ['linux_use_tcmalloc==1', {
273 '../base/allocator/allocator.gyp:allocator',
276 ['toolkit_views==1', {
278 'browser/ui/gtk/gtk_expanded_container_unittest.cc',
285 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
288 ['toolkit_uses_gtk == 1', {
290 'base/dragdrop/gtk_dnd_util_unittest.cc',
293 '../build/linux/system.gyp:gtk',
296 ['OS=="android" or OS=="ios"', {
298 'gfx/render_text_unittest.cc',
301 ['OS!="win" or use_aura==0', {
303 'base/view_prop_unittest.cc',
306 ['use_x11==1 and use_aura==1', {
308 'base/cursor/cursor_loader_x11_unittest.cc',
311 ['use_aura==1 or toolkit_views==1', {
313 'base/dragdrop/os_exchange_data_unittest.cc',
314 'events/gestures/velocity_calculator_unittest.cc',
318 'events/event_dispatcher_unittest.cc',
319 'events/event_unittest.cc',
324 'base/dialogs/select_file_dialog_win_unittest.cc',
325 'base/dragdrop/os_exchange_data_win_unittest.cc',
326 'gfx/screen_unittest.cc',
331 'base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc',
335 'target_conditions': [
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$'],
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"', {
353 'target_name': 'ui_unittests_apk',
359 'test_suite_name': 'ui_unittests',
360 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)ui_unittests<(SHARED_LIB_SUFFIX)',
362 'includes': [ '../build/apk_test.gypi' ],