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_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.
44 'base/test/ui_controls_mac.mm',
45 'base/test/ui_controls_win.cc',
51 'target_name': 'ui_unittests',
52 'type': '<(gtest_target_type)',
54 '../base/base.gyp:base',
55 '../base/base.gyp:test_support_base',
56 '../skia/skia.gyp:skia',
57 '../testing/gmock.gyp:gmock',
58 '../testing/gtest.gyp:gtest',
59 '../third_party/icu/icu.gyp:icui18n',
60 '../third_party/icu/icu.gyp:icuuc',
61 '../url/url.gyp:url_lib',
62 'base/strings/ui_strings.gyp:ui_strings',
63 'base/ui_base.gyp:ui_base',
64 'events/events.gyp:events_base',
65 'gfx/gfx.gyp:gfx_test_support',
66 'resources/ui_resources.gyp:ui_resources',
67 'resources/ui_resources.gyp:ui_test_pak',
70 # iOS uses a small subset of ui. common_sources are the only files that
73 'base/layout_unittest.cc',
74 'base/l10n/l10n_util_mac_unittest.mm',
75 'base/l10n/l10n_util_unittest.cc',
76 'base/l10n/l10n_util_win_unittest.cc',
77 'base/l10n/time_format_unittest.cc',
78 'base/models/tree_node_iterator_unittest.cc',
79 'base/resource/data_pack_literal.cc',
80 'base/resource/data_pack_unittest.cc',
81 'base/resource/resource_bundle_unittest.cc',
82 'base/test/run_all_unittests.cc',
83 'gfx/font_unittest.cc',
84 'gfx/image/image_family_unittest.cc',
85 'gfx/image/image_skia_unittest.cc',
86 'gfx/image/image_unittest.cc',
87 'gfx/image/image_unittest_util.cc',
88 'gfx/image/image_unittest_util.h',
89 'gfx/image/image_unittest_util_ios.mm',
90 'gfx/image/image_unittest_util_mac.mm',
91 'gfx/screen_unittest.cc',
92 'gfx/text_elider_unittest.cc',
93 'gfx/text_utils_unittest.cc',
96 '<@(_common_sources)',
97 'base/accelerators/accelerator_manager_unittest.cc',
98 'base/accelerators/menu_label_accelerator_util_linux_unittest.cc',
99 'base/clipboard/clipboard_unittest.cc',
100 'base/clipboard/custom_data_helper_unittest.cc',
101 'base/cocoa/base_view_unittest.mm',
102 'base/cocoa/cocoa_base_utils_unittest.mm',
103 'base/cocoa/controls/blue_label_button_unittest.mm',
104 'base/cocoa/controls/hover_image_menu_button_unittest.mm',
105 'base/cocoa/controls/hyperlink_button_cell_unittest.mm',
106 'base/cocoa/focus_tracker_unittest.mm',
107 'base/cocoa/fullscreen_window_manager_unittest.mm',
108 'base/cocoa/hover_image_button_unittest.mm',
109 'base/cocoa/menu_controller_unittest.mm',
110 'base/cocoa/nsgraphics_context_additions_unittest.mm',
111 'base/cocoa/tracking_area_unittest.mm',
112 'base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc',
113 'base/models/list_model_unittest.cc',
114 'base/models/list_selection_model_unittest.cc',
115 'base/models/tree_node_model_unittest.cc',
116 'base/test/data/resource.h',
117 'base/text/bytes_formatting_unittest.cc',
118 'base/view_prop_unittest.cc',
119 'base/webui/web_ui_util_unittest.cc',
120 'gfx/animation/tween_unittest.cc',
121 'gfx/blit_unittest.cc',
122 'gfx/break_list_unittest.cc',
123 'gfx/canvas_unittest.cc',
124 'gfx/canvas_unittest_mac.mm',
125 'gfx/codec/jpeg_codec_unittest.cc',
126 'gfx/color_analysis_unittest.cc',
127 'gfx/font_list_unittest.cc',
128 'gfx/image/image_mac_unittest.mm',
129 'gfx/image/image_util_unittest.cc',
130 'gfx/platform_font_mac_unittest.mm',
131 'gfx/render_text_unittest.cc',
132 'gfx/sequential_id_generator_unittest.cc',
133 'gfx/transform_util_unittest.cc',
134 'gfx/utf16_indexing_unittest.cc',
137 'display/display_unittests.gypi',
138 'ozone/ozone_unittests.gypi',
145 'sources' : ['<@(_all_sources)'],
147 'base/ime/ime_unittests.gypi',
151 '<@(_common_sources)',
153 # The ResourceBundle unittest expects a locale.pak file to exist in
154 # the bundle for English-US. Copy it in from where it was generated
155 # by ui_resources.gyp:ui_test_pak.
156 'mac_bundle_resources': [
157 '<(PRODUCT_DIR)/ui/en.lproj/locale.pak',
162 'base/dragdrop/os_exchange_data_win_unittest.cc',
163 'base/win/hwnd_subclass_unittest.cc',
164 'gfx/font_fallback_win_unittest.cc',
165 'gfx/icon_util_unittest.cc',
166 'gfx/icon_util_unittests.rc',
167 'gfx/platform_font_win_unittest.cc',
171 '../third_party/wtl/include',
179 'AdditionalDependencies': [
191 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
192 'msvs_disabled_warnings': [ 4267, ],
194 ['OS != "mac" and OS != "ios"', {
196 'gfx/transform_unittest.cc',
197 'gfx/interpolated_transform_unittest.cc',
200 ['OS == "android"', {
202 'gfx/android/scroller_unittest.cc',
205 ['OS == "android" and gtest_target_type == "shared_library"', {
207 '../testing/android/native_test.gyp:native_test_native_code',
212 '../build/linux/system.gyp:fontconfig',
213 '../build/linux/system.gyp:pangocairo',
216 'gfx/platform_font_pango_unittest.cc',
219 # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
220 ['(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)', {
222 '../base/allocator/allocator.gyp:allocator',
229 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
232 ['OS=="android" or OS=="ios"', {
234 'gfx/render_text_unittest.cc',
237 ['OS!="win" or use_aura==0', {
239 'base/view_prop_unittest.cc',
242 ['use_x11==1 and use_aura==1', {
244 'base/cursor/cursor_loader_x11_unittest.cc',
249 'events/events.gyp:events_test_support',
250 'gfx/gfx.gyp:gfx_test_support',
251 'ui_unittests_bundle',
254 ['use_aura==1 or toolkit_views==1', {
256 'base/dragdrop/os_exchange_data_unittest.cc',
259 'events/events.gyp:events',
260 'events/events.gyp:events_base',
261 'events/events.gyp:events_test_support',
266 'base/dragdrop/os_exchange_data_win_unittest.cc',
267 'gfx/screen_unittest.cc',
270 ['use_ozone==1 and use_pango==0', {
272 'gfx/text_elider_unittest.cc',
273 'gfx/font_unittest.cc',
274 'gfx/font_list_unittest.cc',
275 'gfx/render_text_unittest.cc',
276 'gfx/canvas_unittest.cc',
281 '../chromeos/chromeos.gyp:chromeos',
284 'base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc',
288 'target_conditions': [
291 # Pull in specific Mac files for iOS (which have been filtered out
292 # by file name rules).
293 ['include', '^base/l10n/l10n_util_mac_unittest\\.mm$'],
300 # Mac target to build a test Framework bundle to mock out resource loading.
304 'target_name': 'ui_unittests_bundle',
305 'type': 'shared_library',
307 'resources/ui_resources.gyp:ui_test_pak',
309 'includes': [ 'ui_unittests_bundle.gypi' ],
313 # Special target to wrap a gtest_target_type==shared_library
314 # ui_unittests into an android apk for execution.
315 # See base.gyp for TODO(jrg)s about this strategy.
316 ['OS == "android" and gtest_target_type == "shared_library"', {
319 'target_name': 'ui_unittests_apk',
325 'test_suite_name': 'ui_unittests',
327 'includes': [ '../build/apk_test.gypi' ],