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',
16 'events/events.gyp:events',
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',
39 'type': 'static_library',
40 'includes': [ 'base/ime/ime_test_support.gypi' ],
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.
48 # The cocoa files don't apply to iOS.
49 'sources/': [['exclude', 'cocoa']],
53 '../chromeos/chromeos.gyp:chromeos_test_support_without_gmock',
54 '../skia/skia.gyp:skia',
59 'base/test/ui_controls_win.cc',
65 'target_name': 'run_ui_unittests',
66 'type': 'static_library',
68 '../base/base.gyp:base',
69 '../base/base.gyp:test_support_base',
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',
94 'shell_dialogs/shell_dialogs.gyp:shell_dialogs',
95 'ui.gyp:keycode_converter',
97 'ui.gyp:ui_resources',
100 # iOS uses a small subset of ui. common_sources are the only files that
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',
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',
205 'sources' : ['<@(_all_sources)'],
207 'base/ime/ime_unittests.gypi',
211 '<@(_common_sources)',
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',
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',
231 '../third_party/wtl/include',
239 'AdditionalDependencies': [
251 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
252 'msvs_disabled_warnings': [ 4267, ],
254 ['OS == "linux" and toolkit_views==1', {
256 'events/x/events_x_unittest.cc',
259 ['OS != "mac" and OS != "ios"', {
261 'gfx/transform_unittest.cc',
262 'gfx/interpolated_transform_unittest.cc',
265 ['OS == "android" and gtest_target_type == "shared_library"', {
267 '../testing/android/native_test.gyp:native_test_native_code',
270 ['use_glib == 1 or OS == "ios"', {
272 'base/strings/ui_strings.gyp:ui_unittest_strings',
277 '../build/linux/system.gyp:fontconfig',
278 '../build/linux/system.gyp:pangocairo',
281 'gfx/platform_font_pango_unittest.cc',
284 ['linux_use_tcmalloc==1', {
286 '../base/allocator/allocator.gyp:allocator',
289 ['toolkit_views==1', {
291 'browser/ui/gtk/gtk_expanded_container_unittest.cc',
298 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
301 ['toolkit_uses_gtk == 1', {
303 'base/dragdrop/gtk_dnd_util_unittest.cc',
306 '../build/linux/system.gyp:gtk',
309 ['OS=="android" or OS=="ios"', {
311 'gfx/render_text_unittest.cc',
314 ['OS!="win" or use_aura==0', {
316 'base/view_prop_unittest.cc',
319 ['use_x11==1 and use_aura==1', {
321 'base/cursor/cursor_loader_x11_unittest.cc',
324 ['use_aura==1 or toolkit_views==1', {
326 'base/dragdrop/os_exchange_data_unittest.cc',
327 'events/gestures/velocity_calculator_unittest.cc',
331 'events/event_dispatcher_unittest.cc',
332 'events/event_unittest.cc',
337 'base/dialogs/select_file_dialog_win_unittest.cc',
338 'base/dragdrop/os_exchange_data_win_unittest.cc',
339 'gfx/screen_unittest.cc',
344 '<(DEPTH)/build/linux/system.gyp:dridrm',
349 'base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc',
353 'target_conditions': [
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$'],
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"', {
371 'target_name': 'ui_unittests_apk',
377 'test_suite_name': 'ui_unittests',
378 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)ui_unittests<(SHARED_LIB_SUFFIX)',
380 'includes': [ '../build/apk_test.gypi' ],