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',
9 'type': 'static_library',
11 '../base/base.gyp:base',
12 '../skia/skia.gyp:skia',
13 '../testing/gtest.gyp:gtest',
16 'base/test/cocoa_test_event_utils.h',
17 'base/test/cocoa_test_event_utils.mm',
18 'base/test/ui_cocoa_test_helper.h',
19 'base/test/ui_cocoa_test_helper.mm',
20 'base/test/dummy_input_method.cc',
21 'base/test/dummy_input_method.h',
28 'includes': [ 'base/ime/ime_test_support.gypi' ],
30 # The cocoa files don't apply to iOS.
31 'sources/': [['exclude', 'cocoa']],
35 '../chromeos/chromeos.gyp:chromeos_test_support_without_gmock',
36 '../skia/skia.gyp:skia',
42 'target_name': 'run_ui_unittests',
43 'type': 'static_library',
45 '../base/base.gyp:base',
46 '../base/base.gyp:test_support_base',
52 'test/run_all_unittests.cc',
56 'target_name': 'ui_unittests',
57 'type': '<(gtest_target_type)',
59 '../base/base.gyp:base',
60 '../base/base.gyp:test_support_base',
61 '../build/temp_gyp/googleurl.gyp:googleurl',
62 '../skia/skia.gyp:skia',
63 '../testing/gmock.gyp:gmock',
64 '../testing/gtest.gyp:gtest',
65 '../third_party/icu/icu.gyp:icui18n',
66 '../third_party/icu/icu.gyp:icuuc',
67 '../third_party/libpng/libpng.gyp:libpng',
74 # iOS uses a small subset of ui. common_sources are the only files that
77 'base/animation/animation_container_unittest.cc',
78 'base/animation/animation_unittest.cc',
79 'base/animation/multi_animation_unittest.cc',
80 'base/animation/slide_animation_unittest.cc',
81 'base/layout_unittest.cc',
82 'base/l10n/l10n_util_mac_unittest.mm',
83 'base/l10n/l10n_util_unittest.cc',
84 'base/l10n/l10n_util_win_unittest.cc',
85 'base/models/tree_node_iterator_unittest.cc',
86 'base/range/range_mac_unittest.mm',
87 'base/range/range_unittest.cc',
88 'base/range/range_win_unittest.cc',
89 'base/resource/data_pack_literal.cc',
90 'base/resource/data_pack_unittest.cc',
91 'base/resource/resource_bundle_unittest.cc',
92 'base/text/text_elider_unittest.cc',
93 'gfx/codec/png_codec_unittest.cc',
94 'gfx/color_utils_unittest.cc',
95 'gfx/display_unittest.cc',
96 'gfx/font_unittest.cc',
97 'gfx/image/image_family_unittest.cc',
98 'gfx/image/image_skia_unittest.cc',
99 'gfx/image/image_unittest.cc',
100 'gfx/image/image_unittest_util.cc',
101 'gfx/image/image_unittest_util.h',
102 'gfx/image/image_unittest_util_ios.mm',
103 'gfx/image/image_unittest_util_mac.mm',
104 'gfx/insets_unittest.cc',
105 'gfx/matrix3_unittest.cc',
106 'gfx/point_unittest.cc',
107 'gfx/point3_unittest.cc',
108 'gfx/quad_unittest.cc',
109 'gfx/rect_unittest.cc',
110 'gfx/safe_integer_conversions_unittest.cc',
111 'gfx/screen_unittest.cc',
112 'gfx/shadow_value_unittest.cc',
113 'gfx/size_unittest.cc',
114 'gfx/skbitmap_operations_unittest.cc',
115 'gfx/text_utils_unittest.cc',
116 'gfx/vector2d_unittest.cc',
117 'gfx/vector3d_unittest.cc',
120 '<@(_common_sources)',
121 'base/accelerators/accelerator_manager_unittest.cc',
122 'base/clipboard/clipboard_unittest.cc',
123 'base/clipboard/custom_data_helper_unittest.cc',
124 'base/cocoa/base_view_unittest.mm',
125 'base/cocoa/events_mac_unittest.mm',
126 'base/cocoa/focus_tracker_unittest.mm',
127 'base/cocoa/fullscreen_window_manager_unittest.mm',
128 'base/cocoa/hover_image_button_unittest.mm',
129 'base/cocoa/tracking_area_unittest.mm',
130 'base/events/event_dispatcher_unittest.cc',
131 'base/events/event_unittest.cc',
132 'base/gtk/gtk_expanded_container_unittest.cc',
133 'base/gtk/gtk_im_context_util_unittest.cc',
134 'base/gtk/menu_label_accelerator_util_unittest.cc',
135 'base/keycodes/usb_keycode_map_unittest.cc',
136 'base/models/list_model_unittest.cc',
137 'base/models/list_selection_model_unittest.cc',
138 'base/models/tree_node_model_unittest.cc',
139 'base/test/data/resource.h',
140 'base/text/bytes_formatting_unittest.cc',
141 'base/text/utf16_indexing_unittest.cc',
142 'base/view_prop_unittest.cc',
143 'gfx/blit_unittest.cc',
144 'gfx/break_list_unittest.cc',
145 'gfx/canvas_unittest.cc',
146 'gfx/codec/jpeg_codec_unittest.cc',
147 'gfx/color_analysis_unittest.cc',
148 'gfx/font_list_unittest.cc',
149 'gfx/image/image_mac_unittest.mm',
150 'gfx/image/image_util_unittest.cc',
151 'gfx/platform_font_mac_unittest.mm',
152 'gfx/render_text_unittest.cc',
153 'gfx/transform_util_unittest.cc',
154 'gfx/video_decode_acceleration_support_mac_unittest.mm',
155 'shell_dialogs/select_file_dialog_win_unittest.cc',
156 'webui/web_ui_util_unittest.cc',
163 'sources' : ['<@(_all_sources)'],
165 'base/ime/ime_unittests.gypi',
169 '<@(_common_sources)',
171 # The ResourceBundle unittest expects a locale.pak file to exist in
172 # the bundle for English-US. Copy it in from where it was generated
173 # by ui_strings.gyp:ui_unittest_strings.
174 'mac_bundle_resources': [
175 '<(PRODUCT_DIR)/ui_unittests_strings/en.lproj/locale.pak',
180 'test/ui_unittests.rc',
181 'base/dragdrop/os_exchange_data_win_unittest.cc',
182 'base/win/hwnd_subclass_unittest.cc',
183 'gfx/font_fallback_win_unittest.cc',
184 'gfx/icon_util_unittest.cc',
185 'gfx/platform_font_win_unittest.cc',
189 '../third_party/wtl/include',
197 'AdditionalDependencies': [
209 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
210 'msvs_disabled_warnings': [ 4267, ],
214 'base/x/x11_util_unittest.cc',
215 'gfx/platform_font_pango_unittest.cc',
218 ['OS == "linux" and toolkit_views==1', {
220 'base/x/events_x_unittest.cc',
223 ['OS != "mac" and OS != "ios"', {
225 'gfx/transform_unittest.cc',
226 'gfx/interpolated_transform_unittest.cc',
229 ['OS == "android" and gtest_target_type == "shared_library"', {
231 '../testing/android/native_test.gyp:native_test_native_code',
234 ['use_glib == 1 or OS == "ios"', {
236 'base/strings/ui_strings.gyp:ui_unittest_strings',
241 '../build/linux/system.gyp:pangocairo',
244 ['linux_use_tcmalloc==1', {
246 '../base/allocator/allocator.gyp:allocator',
249 ['toolkit_views==1', {
251 'browser/ui/gtk/gtk_expanded_container_unittest.cc',
258 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
261 ['toolkit_uses_gtk == 1', {
263 'base/dragdrop/gtk_dnd_util_unittest.cc',
266 '../build/linux/system.gyp:gtk',
269 ['OS=="android" or OS=="ios"', {
271 'gfx/render_text_unittest.cc',
274 ['OS!="win" or use_aura==0', {
276 'base/view_prop_unittest.cc',
279 ['use_aura==1 or toolkit_views==1', {
281 'base/gestures/velocity_calculator_unittest.cc',
285 'base/events/event_dispatcher_unittest.cc',
286 'base/events/event_unittest.cc',
291 'base/dialogs/select_file_dialog_win_unittest.cc',
292 'base/dragdrop/os_exchange_data_win_unittest.cc',
293 'gfx/screen_unittest.cc',
297 'target_conditions': [
300 # Pull in specific Mac files for iOS (which have been filtered out
301 # by file name rules).
302 ['include', '^base/l10n/l10n_util_mac_unittest\\.mm$'],
309 # Special target to wrap a gtest_target_type==shared_library
310 # ui_unittests into an android apk for execution.
311 # See base.gyp for TODO(jrg)s about this strategy.
312 ['OS == "android" and gtest_target_type == "shared_library"', {
315 'target_name': 'ui_unittests_apk',
321 'test_suite_name': 'ui_unittests',
322 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)ui_unittests<(SHARED_LIB_SUFFIX)',
324 'includes': [ '../build/apk_test.gypi' ],