Removing flow to demote App Launcher to App Host, so app_host.exe can be deleted...
[chromium-blink-merge.git] / ui / ui_unittests.gypi
blob715ce17ef2084b14a67cf40f7deaa8a177ce1488
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.
6   'targets': [
7     {
8       'target_name': 'ui_test_support',
9       'type': 'static_library',
10       'dependencies': [
11         '../base/base.gyp:base',
12         '../skia/skia.gyp:skia',
13         '../testing/gtest.gyp:gtest',
14       ],
15       'sources': [
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',
22       ],
23       'include_dirs': [
24         '../',
25       ],
26       'conditions': [
27         ['OS!="ios"', {
28           'includes': [ 'base/ime/ime_test_support.gypi' ],
29         }, {  # OS=="ios"
30           # The cocoa files don't apply to iOS.
31           'sources/': [['exclude', 'cocoa']],
32         }],
33         ['chromeos==1', {
34           'dependencies': [
35             '../chromeos/chromeos.gyp:chromeos_test_support_without_gmock',
36             '../skia/skia.gyp:skia',
37           ],
38         }],
39       ],
40     },
41     {
42       'target_name': 'ui_unittests',
43       'type': '<(gtest_target_type)',
44       'dependencies': [
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',
54         'ui',
55         'ui_resources',
56         'ui_test_support',
57       ],
58       # iOS uses a small subset of ui. common_sources are the only files that
59       # are built on iOS.
60       'common_sources' : [
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',
101         'test/test_suite.h',
102       ],
103       'all_sources': [
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',
135       ],
136       'include_dirs': [
137         '../',
138       ],
139       'conditions': [
140         ['OS!="ios"', {
141           'sources' : ['<@(_all_sources)'],
142           'includes': [
143             'base/ime/ime_unittests.gypi',
144           ],
145         }, {  # OS=="ios"
146           'sources' : [
147             '<@(_common_sources)',
148           ],
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',
154           ],
155         }],
156         ['OS == "win"', {
157           'sources': [
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',
163           ],
164           'include_dirs': [
165             '../..',
166             '../third_party/wtl/include',
167           ],
168           'msvs_settings': {
169             'VCLinkerTool': {
170               'DelayLoadDLLs': [
171                 'd2d1.dll',
172                 'd3d10_1.dll',
173               ],
174               'AdditionalDependencies': [
175                 'd2d1.lib',
176                 'd3d10_1.lib',
177               ],
178             },
179           },
180           'link_settings': {
181             'libraries': [
182               '-limm32.lib',
183               '-loleacc.lib',
184             ],
185           },
186         }],
187         ['OS == "linux"', {
188           'sources': [
189             'gfx/platform_font_pango_unittest.cc',
190           ],
191         }],
192         ['OS == "linux" and toolkit_views==1', {
193           'sources': [
194             'base/x/events_x_unittest.cc',
195           ],
196         }],
197         ['OS != "mac" and OS != "ios"', {
198           'sources': [
199             'gfx/transform_unittest.cc',
200             'gfx/interpolated_transform_unittest.cc',
201           ],
202         }],
203         ['OS == "android" and gtest_target_type == "shared_library"', {
204           'dependencies': [
205             '../testing/android/native_test.gyp:native_test_native_code',
206           ],
207         }],
208         ['use_glib == 1 or OS == "ios"', {
209           'dependencies': [
210             'base/strings/ui_strings.gyp:ui_unittest_strings',
211           ],
212         }],
213         ['use_glib == 1', {
214           'dependencies': [
215             '../build/linux/system.gyp:pangocairo',
216             '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
217           ],
218           'conditions': [
219             ['linux_use_tcmalloc==1', {
220                'dependencies': [
221                  '../base/allocator/allocator.gyp:allocator',
222                ],
223             }],
224             ['toolkit_views==1', {
225               'sources!': [
226                 'browser/ui/gtk/gtk_expanded_container_unittest.cc',
227               ],
228             }],
229           ],
230         }],
231         ['toolkit_uses_gtk == 1', {
232           'sources': [
233             'base/dragdrop/gtk_dnd_util_unittest.cc',
234           ],
235           'dependencies': [
236             '../build/linux/system.gyp:gtk',
237           ],
238         }],
239         ['OS=="android" or OS=="ios"', {
240           'sources!': [
241             'gfx/render_text_unittest.cc',
242           ],
243         }],
244         ['OS!="win" or use_aura==0', {
245           'sources!': [
246             'base/view_prop_unittest.cc',
247           ],
248         }],
249         ['use_aura==1 or toolkit_views==1',  {
250           'sources': [
251             'base/gestures/velocity_calculator_unittest.cc',
252           ],
253         }, {
254           'sources!': [
255             'base/events/event_dispatcher_unittest.cc',
256             'base/events/event_unittest.cc',
257           ],
258         }],
259         ['use_aura==1', {
260           'sources!': [
261             'base/dialogs/select_file_dialog_win_unittest.cc',
262             'base/dragdrop/os_exchange_data_win_unittest.cc',
263             'gfx/screen_unittest.cc',
264           ],
265         }],
266       ],
267       'target_conditions': [
268         ['OS == "ios"', {
269           'sources/': [
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$'],
273           ],
274         }],
275       ],
276     },
277   ],
278   'conditions': [
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"', {
283       'targets': [
284         {
285           'target_name': 'ui_unittests_apk',
286           'type': 'none',
287           'dependencies': [
288             'ui_unittests',
289           ],
290           'variables': {
291             'test_suite_name': 'ui_unittests',
292             'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)ui_unittests<(SHARED_LIB_SUFFIX)',
293           },
294           'includes': [ '../build/apk_test.gypi' ],
295         },
296       ],
297     }],
298   ],