blob: f9c9c78f60028d80fbb3438b1222d42ced8aa4e8 [file] [log] [blame]
[email protected]8d901a82012-01-04 19:41:301# Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]6ecdfa3f2011-03-18 17:24:392# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5{
6 'targets': [
7 {
[email protected]e5338112011-09-08 22:14:568 'target_name': 'ui_test_support',
[email protected]3c8cd8192012-05-15 16:48:149 'type': 'static_library',
[email protected]e5338112011-09-08 22:14:5610 'dependencies': [
11 '../base/base.gyp:base',
12 '../testing/gtest.gyp:gtest',
13 ],
14 'sources': [
[email protected]be33ec52011-09-09 20:07:1715 'base/test/cocoa_test_event_utils.h',
16 'base/test/cocoa_test_event_utils.mm',
[email protected]e5338112011-09-08 22:14:5617 'base/test/ui_cocoa_test_helper.h',
18 'base/test/ui_cocoa_test_helper.mm',
[email protected]3c8cd8192012-05-15 16:48:1419 'base/test/dummy_input_method.cc',
20 'base/test/dummy_input_method.h',
[email protected]e5338112011-09-08 22:14:5621 ],
22 'include_dirs': [
23 '../',
24 ],
[email protected]e5338112011-09-08 22:14:5625 },
26 {
[email protected]6ecdfa3f2011-03-18 17:24:3927 'target_name': 'ui_unittests',
[email protected]c205e0c2012-05-05 03:11:3828 'type': '<(gtest_target_type)',
[email protected]78fcae062012-01-12 07:03:5929 'includes': [
30 'base/ime/ime_unittests.gypi',
31 ],
[email protected]6ecdfa3f2011-03-18 17:24:3932 'dependencies': [
33 '../base/base.gyp:base',
34 '../base/base.gyp:test_support_base',
[email protected]ea47b6a2011-07-17 19:39:4235 '../build/temp_gyp/googleurl.gyp:googleurl',
[email protected]6ecdfa3f2011-03-18 17:24:3936 '../skia/skia.gyp:skia',
37 '../testing/gmock.gyp:gmock',
38 '../testing/gtest.gyp:gtest',
[email protected]c743d4c72011-08-31 22:15:4839 '../third_party/icu/icu.gyp:icui18n',
40 '../third_party/icu/icu.gyp:icuuc',
[email protected]17abeb42012-03-08 12:38:3241 '../third_party/libpng/libpng.gyp:libpng',
[email protected]f75b44c2012-05-16 21:36:0442 'native_theme_resources',
[email protected]e5338112011-09-08 22:14:5643 'ui',
44 'ui_test_support',
[email protected]6ecdfa3f2011-03-18 17:24:3945 ],
46 'sources': [
[email protected]095c8032012-03-10 10:09:2747 'base/accelerators/accelerator_manager_unittest.cc',
[email protected]6ecdfa3f2011-03-18 17:24:3948 'base/animation/animation_container_unittest.cc',
49 'base/animation/animation_unittest.cc',
50 'base/animation/multi_animation_unittest.cc',
51 'base/animation/slide_animation_unittest.cc',
52 'base/clipboard/clipboard_unittest.cc',
[email protected]9d77eaa2011-12-05 20:32:2453 'base/clipboard/custom_data_helper_unittest.cc',
[email protected]e5338112011-09-08 22:14:5654 'base/cocoa/base_view_unittest.mm',
[email protected]6e8c0652012-04-03 04:38:5755 'base/cocoa/fullscreen_window_manager_unittest.mm',
[email protected]bb9bdfc2011-12-20 04:20:1556 'base/cocoa/events_mac_unittest.mm',
[email protected]5b7b9592012-02-02 07:49:1157 'base/cocoa/focus_tracker_unittest.mm',
[email protected]9fb4ad4c2011-08-25 20:16:2258 'base/gtk/gtk_expanded_container_unittest.cc',
[email protected]a738cb172011-03-23 23:19:2059 'base/gtk/gtk_im_context_util_unittest.cc',
[email protected]4282bbd2012-05-04 17:51:0460 'base/gtk/menu_label_accelerator_util_unittest.cc',
[email protected]336678102011-06-16 14:53:5261 'base/l10n/l10n_util_mac_unittest.mm',
62 'base/l10n/l10n_util_unittest.cc',
[email protected]1a6089b52011-12-23 05:29:2063 'base/models/list_model_unittest.cc',
[email protected]47ac5072011-06-10 18:29:0064 'base/models/tree_node_iterator_unittest.cc',
65 'base/models/tree_node_model_unittest.cc',
[email protected]6ecdfa3f2011-03-18 17:24:3966 'base/range/range_unittest.cc',
[email protected]c44d8d32011-07-04 21:28:5867 'base/range/range_mac_unittest.mm',
68 'base/range/range_win_unittest.cc',
[email protected]aae69652011-09-06 22:31:2869 'base/resource/data_pack_literal.cc',
[email protected]8c4045d72f2011-06-17 14:23:3770 'base/resource/data_pack_unittest.cc',
[email protected]a9585712011-06-20 14:50:5171 'base/resource/resource_bundle_unittest.cc',
[email protected]7a3b2632011-06-22 20:40:2272 'base/text/bytes_formatting_unittest.cc',
[email protected]8c4045d72f2011-06-17 14:23:3773 'base/test/data/resource.h',
[email protected]336678102011-06-16 14:53:5274 'base/text/text_elider_unittest.cc',
[email protected]bec929c2012-03-02 06:23:5075 'base/text/utf16_indexing_unittest.cc',
[email protected]40c15eb2012-04-26 19:20:2876 'base/view_prop_unittest.cc',
[email protected]6ecdfa3f2011-03-18 17:24:3977 'gfx/blit_unittest.cc',
[email protected]90b89ef02012-04-02 16:55:3478 'gfx/canvas_unittest.cc',
[email protected]6ecdfa3f2011-03-18 17:24:3979 'gfx/codec/jpeg_codec_unittest.cc',
80 'gfx/codec/png_codec_unittest.cc',
[email protected]e7de08f72011-06-09 22:24:5981 'gfx/color_analysis_unittest.cc',
[email protected]6ecdfa3f2011-03-18 17:24:3982 'gfx/color_utils_unittest.cc',
[email protected]8d901a82012-01-04 19:41:3083 'gfx/font_list_unittest.cc',
[email protected]37f20e72012-03-27 14:43:5584 'gfx/font_unittest.cc',
[email protected]f08e0512011-06-13 18:10:4485 'gfx/image/image_mac_unittest.mm',
86 'gfx/image/image_unittest.cc',
[email protected]f08e0512011-06-13 18:10:4487 'gfx/image/image_unittest_util.cc',
[email protected]37f20e72012-03-27 14:43:5588 'gfx/image/image_unittest_util.h',
[email protected]6ecdfa3f2011-03-18 17:24:3989 'gfx/insets_unittest.cc',
[email protected]b82c42c42012-04-25 20:03:4190 'gfx/monitor_unittest.cc',
[email protected]6ecdfa3f2011-03-18 17:24:3991 'gfx/rect_unittest.cc',
[email protected]6b7d954ff2011-10-25 00:39:3592 'gfx/screen_unittest.cc',
[email protected]0834e1b12012-04-11 02:23:5693 'gfx/shadow_value_unittest.cc',
[email protected]6ecdfa3f2011-03-18 17:24:3994 'gfx/skbitmap_operations_unittest.cc',
[email protected]d2ec9af2011-06-21 17:05:4995 'gfx/skia_util_unittest.cc',
[email protected]665e2b72012-03-14 17:06:5996 'gfx/transform_util_unittest.cc',
[email protected]f0040842012-05-09 23:45:1097 'gfx/video_decode_acceleration_support_mac_unittest.mm',
[email protected]85db5f42012-03-29 23:24:0598 'test/run_all_unittests.cc',
99 'test/test_suite.cc',
100 'test/test_suite.h',
[email protected]f75b44c2012-05-16 21:36:04101 '<(SHARED_INTERMEDIATE_DIR)/ui/native_theme/native_theme_resources.rc',
[email protected]6ecdfa3f2011-03-18 17:24:39102 ],
103 'include_dirs': [
104 '../',
105 ],
106 'conditions': [
[email protected]10ed9c5f2011-06-17 18:14:35107 ['OS == "win"', {
[email protected]6ecdfa3f2011-03-18 17:24:39108 'sources': [
[email protected]10ed9c5f2011-06-17 18:14:35109 'base/dragdrop/os_exchange_data_win_unittest.cc',
[email protected]f78452f2012-05-15 02:07:52110 'base/native_theme/native_theme_win_unittest.cc',
[email protected]2a36be1a2012-04-30 21:18:11111 'base/win/hwnd_subclass_unittest.cc',
[email protected]6ecdfa3f2011-03-18 17:24:39112 'gfx/icon_util_unittest.cc',
[email protected]2a36be1a2012-04-30 21:18:11113 'gfx/platform_font_win_unittest.cc',
[email protected]6ecdfa3f2011-03-18 17:24:39114 ],
115 'include_dirs': [
116 '../..',
117 '../third_party/wtl/include',
118 ],
119 'msvs_settings': {
120 'VCLinkerTool': {
121 'DelayLoadDLLs': [
122 'd2d1.dll',
123 'd3d10_1.dll',
124 ],
125 'AdditionalDependencies': [
126 'd2d1.lib',
127 'd3d10_1.lib',
128 ],
129 },
[email protected]724fffdb2011-03-20 00:39:09130 },
131 'link_settings': {
132 'libraries': [
133 '-limm32.lib',
134 '-loleacc.lib',
135 ],
[email protected]6ecdfa3f2011-03-18 17:24:39136 },
137 }],
[email protected]9bf2a862012-01-25 18:28:06138 ['OS == "linux"', {
139 'sources': [
140 'gfx/platform_font_pango_unittest.cc',
141 ],
142 }],
[email protected]ace7ca02011-11-22 21:34:17143 ['OS == "linux" and toolkit_views==1', {
[email protected]562b8d22011-11-07 22:06:34144 'sources': [
145 'base/x/events_x_unittest.cc',
146 ],
147 }],
[email protected]80248e32011-07-08 15:31:11148 ['OS != "mac"', {
149 'sources': [
150 'gfx/transform_unittest.cc',
151 'gfx/interpolated_transform_unittest.cc',
152 ],
153 }],
[email protected]c205e0c2012-05-05 03:11:38154 ['OS=="android" and "<(gtest_target_type)"=="shared_library"', {
155 'dependencies': [
156 '../testing/android/native_test.gyp:native_test_native_code',
157 ],
158 }],
[email protected]b6bb36e22011-09-21 17:52:54159 ['use_glib == 1', {
[email protected]6ecdfa3f2011-03-18 17:24:39160 'dependencies': [
[email protected]b6bb36e22011-09-21 17:52:54161 '../build/linux/system.gyp:pangocairo',
[email protected]115f8202011-06-17 16:02:57162 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
163 'base/strings/ui_strings.gyp:ui_unittest_strings',
[email protected]6ecdfa3f2011-03-18 17:24:39164 ],
165 'conditions': [
166 ['linux_use_tcmalloc==1', {
167 'dependencies': [
168 '../base/allocator/allocator.gyp:allocator',
169 ],
170 }],
[email protected]9fb4ad4c2011-08-25 20:16:22171 ['toolkit_views==1', {
172 'sources!': [
173 'browser/ui/gtk/gtk_expanded_container_unittest.cc',
174 ],
175 }],
[email protected]6ecdfa3f2011-03-18 17:24:39176 ],
177 }],
[email protected]b6bb36e22011-09-21 17:52:54178 ['toolkit_uses_gtk == 1', {
179 'sources': [
180 'base/dragdrop/gtk_dnd_util_unittest.cc',
181 ],
182 'dependencies': [
183 '../build/linux/system.gyp:gtk',
184 ],
185 }],
[email protected]27521a72012-01-13 02:09:47186 ['toolkit_views==1 and OS!="mac"', {
[email protected]ff44d712011-07-25 08:42:52187 'sources': [
188 'gfx/render_text_unittest.cc',
189 ],
190 }],
[email protected]40c15eb2012-04-26 19:20:28191 ['OS!="win" or use_aura==0', {
[email protected]6e88e552011-10-27 17:18:00192 'sources!': [
[email protected]939e4ed2011-11-01 17:51:32193 'base/view_prop_unittest.cc',
[email protected]40c15eb2012-04-26 19:20:28194 ],
195 }],
196 ['use_aura==1', {
197 'sources!': [
[email protected]1e25fbf52012-05-14 23:10:10198 'base/dragdrop/os_exchange_data_win_unittest.cc',
[email protected]f78452f2012-05-15 02:07:52199 'base/native_theme/native_theme_win_unittest.cc',
200 'gfx/screen_unittest.cc',
[email protected]6b7d954ff2011-10-25 00:39:35201 ],
[email protected]2e79f732011-11-10 17:48:52202 }],
[email protected]81675c92012-04-05 22:14:49203 ['use_aura==1 or toolkit_views==1', {
204 'sources': [
205 'base/gestures/velocity_calculator_unittest.cc',
206 ],
207 }],
[email protected]6ecdfa3f2011-03-18 17:24:39208 ],
209 },
210 ],
[email protected]c205e0c2012-05-05 03:11:38211 'conditions': [
212 # Special target to wrap a <(gtest_target_type)==shared_library
213 # ui_unittests into an android apk for execution.
214 # See base.gyp for TODO(jrg)s about this strategy.
215 ['OS=="android" and "<(gtest_target_type)"=="shared_library"', {
216 'targets': [
217 {
218 'target_name': 'ui_unittests_apk',
219 'type': 'none',
220 'dependencies': [
221 'ui_unittests',
222 ],
223 'actions': [
224 {
225 # Generate apk files (including source and antfile) from
226 # a template, and builds them.
227 'action_name': 'generate_and_build',
228 'inputs': [
[email protected]5c5b0d4d2012-05-16 03:46:39229 '../testing/android/AndroidManifest.xml',
[email protected]c205e0c2012-05-05 03:11:38230 '../testing/android/generate_native_test.py',
231 '<(PRODUCT_DIR)/lib.target/libui_unittests.so',
[email protected]280e9b52012-05-11 03:23:47232 '<(PRODUCT_DIR)/lib.java/chromium_base.jar',
[email protected]c205e0c2012-05-05 03:11:38233 ],
234 'outputs': [
[email protected]5c5b0d4d2012-05-16 03:46:39235 '<(PRODUCT_DIR)/ui_unittests_apk/ui_unittests-debug.apk',
[email protected]c205e0c2012-05-05 03:11:38236 ],
237 'action': [
238 '../testing/android/generate_native_test.py',
239 '--native_library',
240 '<(PRODUCT_DIR)/lib.target/libui_unittests.so',
241 # TODO(jrg): find a better way to specify jar
242 # dependencies. Hard coding seems fragile.
243 '--jar',
[email protected]280e9b52012-05-11 03:23:47244 '<(PRODUCT_DIR)/lib.java/chromium_base.jar',
[email protected]c205e0c2012-05-05 03:11:38245 '--output',
246 '<(PRODUCT_DIR)/ui_unittests_apk',
247 '--ant-args',
248 '-DPRODUCT_DIR=<(PRODUCT_DIR)',
249 '--ant-compile'
250 ],
251 },
252 ]
253 },
254 ],
255 }],
256 ],
[email protected]6ecdfa3f2011-03-18 17:24:39257}