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': 'ui_unittests',
43 'type': '<(gtest_target_type)',
45 '../base/base.gyp:base',
46 '../base/base.gyp:test_support_base',
47 '../build/temp_gyp/googleurl.gyp:googleurl',
48 '../skia/skia.gyp:skia',
49 '../testing/gmock.gyp:gmock',
50 '../testing/gtest.gyp:gtest',
51 '../third_party/icu/icu.gyp:icui18n',
52 '../third_party/icu/icu.gyp:icuuc',
53 '../third_party/libpng/libpng.gyp:libpng',
58 # iOS uses a small subset of ui. common_sources are the only files that
61 'base/animation/animation_container_unittest.cc',
62 'base/animation/animation_unittest.cc',
63 'base/animation/multi_animation_unittest.cc',
64 'base/animation/slide_animation_unittest.cc',
65 'base/layout_unittest.cc',
66 'base/l10n/l10n_util_mac_unittest.mm',
67 'base/l10n/l10n_util_unittest.cc',
68 'base/models/tree_node_iterator_unittest.cc',
69 'base/range/range_mac_unittest.mm',
70 'base/range/range_unittest.cc',
71 'base/range/range_win_unittest.cc',
72 'base/resource/data_pack_literal.cc',
73 'base/resource/data_pack_unittest.cc',
74 'base/resource/resource_bundle_unittest.cc',
75 'base/text/text_elider_unittest.cc',
76 'gfx/codec/png_codec_unittest.cc',
77 'gfx/color_utils_unittest.cc',
78 'gfx/display_unittest.cc',
79 'gfx/font_unittest.cc',
80 'gfx/image/image_skia_unittest.cc',
81 'gfx/image/image_unittest.cc',
82 'gfx/image/image_unittest_util.cc',
83 'gfx/image/image_unittest_util.h',
84 'gfx/image/image_unittest_util_ios.mm',
85 'gfx/image/image_unittest_util_mac.mm',
86 'gfx/insets_unittest.cc',
87 'gfx/point_unittest.cc',
88 'gfx/point3_unittest.cc',
89 'gfx/quad_unittest.cc',
90 'gfx/rect_unittest.cc',
91 'gfx/safe_integer_conversions_unittest.cc',
92 'gfx/screen_unittest.cc',
93 'gfx/shadow_value_unittest.cc',
94 'gfx/size_unittest.cc',
95 'gfx/skbitmap_operations_unittest.cc',
96 'gfx/text_utils_unittest.cc',
97 'gfx/vector2d_unittest.cc',
98 'gfx/vector3d_unittest.cc',
99 'test/run_all_unittests.cc',
100 'test/test_suite.cc',
104 '<@(_common_sources)',
105 'base/accelerators/accelerator_manager_unittest.cc',
106 'base/clipboard/clipboard_unittest.cc',
107 'base/clipboard/custom_data_helper_unittest.cc',
108 'base/cocoa/base_view_unittest.mm',
109 'base/cocoa/events_mac_unittest.mm',
110 'base/cocoa/focus_tracker_unittest.mm',
111 'base/cocoa/fullscreen_window_manager_unittest.mm',
112 'base/dialogs/select_file_dialog_win_unittest.cc',
113 'base/events/event_dispatcher_unittest.cc',
114 'base/events/event_unittest.cc',
115 'base/gtk/gtk_expanded_container_unittest.cc',
116 'base/gtk/gtk_im_context_util_unittest.cc',
117 'base/gtk/menu_label_accelerator_util_unittest.cc',
118 'base/models/list_model_unittest.cc',
119 'base/models/tree_node_model_unittest.cc',
120 'base/test/data/resource.h',
121 'base/text/bytes_formatting_unittest.cc',
122 'base/text/utf16_indexing_unittest.cc',
123 'base/view_prop_unittest.cc',
124 'gfx/blit_unittest.cc',
125 'gfx/canvas_unittest.cc',
126 'gfx/codec/jpeg_codec_unittest.cc',
127 'gfx/color_analysis_unittest.cc',
128 'gfx/font_list_unittest.cc',
129 'gfx/image/image_mac_unittest.mm',
130 'gfx/image/image_util_unittest.cc',
131 'gfx/platform_font_mac_unittest.mm',
132 'gfx/render_text_unittest.cc',
133 'gfx/transform_util_unittest.cc',
134 'gfx/video_decode_acceleration_support_mac_unittest.mm',
141 'sources' : ['<@(_all_sources)'],
143 'base/ime/ime_unittests.gypi',
147 '<@(_common_sources)',
149 # The ResourceBundle unittest expects a locale.pak file to exist in
150 # the bundle for English-US. Copy it in from where it was generated
151 # by ui_strings.gyp:ui_unittest_strings.
152 'mac_bundle_resources': [
153 '<(PRODUCT_DIR)/ui_unittests_strings/en.lproj/locale.pak',
158 'base/dragdrop/os_exchange_data_win_unittest.cc',
159 'base/win/hwnd_subclass_unittest.cc',
160 'gfx/font_fallback_win_unittest.cc',
161 'gfx/icon_util_unittest.cc',
162 'gfx/platform_font_win_unittest.cc',
166 '../third_party/wtl/include',
174 'AdditionalDependencies': [
189 'gfx/platform_font_pango_unittest.cc',
192 ['OS == "linux" and toolkit_views==1', {
194 'base/x/events_x_unittest.cc',
197 ['OS != "mac" and OS != "ios"', {
199 'gfx/transform_unittest.cc',
200 'gfx/interpolated_transform_unittest.cc',
203 ['OS == "android" and gtest_target_type == "shared_library"', {
205 '../testing/android/native_test.gyp:native_test_native_code',
208 ['use_glib == 1 or OS == "ios"', {
210 'base/strings/ui_strings.gyp:ui_unittest_strings',
215 '../build/linux/system.gyp:pangocairo',
216 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
219 ['linux_use_tcmalloc==1', {
221 '../base/allocator/allocator.gyp:allocator',
224 ['toolkit_views==1', {
226 'browser/ui/gtk/gtk_expanded_container_unittest.cc',
231 ['toolkit_uses_gtk == 1', {
233 'base/dragdrop/gtk_dnd_util_unittest.cc',
236 '../build/linux/system.gyp:gtk',
239 ['OS=="android" or OS=="ios"', {
241 'gfx/render_text_unittest.cc',
244 ['OS!="win" or use_aura==0', {
246 'base/view_prop_unittest.cc',
249 ['use_aura==1 or toolkit_views==1', {
251 'base/gestures/velocity_calculator_unittest.cc',
255 'base/events/event_dispatcher_unittest.cc',
256 'base/events/event_unittest.cc',
261 'base/dialogs/select_file_dialog_win_unittest.cc',
262 'base/dragdrop/os_exchange_data_win_unittest.cc',
263 'gfx/screen_unittest.cc',
267 'target_conditions': [
270 # Pull in specific Mac files for iOS (which have been filtered out
271 # by file name rules).
272 ['include', '^base/l10n/l10n_util_mac_unittest\\.mm$'],
279 # Special target to wrap a gtest_target_type==shared_library
280 # ui_unittests into an android apk for execution.
281 # See base.gyp for TODO(jrg)s about this strategy.
282 ['OS == "android" and gtest_target_type == "shared_library"', {
285 'target_name': 'ui_unittests_apk',
291 'test_suite_name': 'ui_unittests',
292 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)ui_unittests<(SHARED_LIB_SUFFIX)',
294 'includes': [ '../build/apk_test.gypi' ],