Implementing the dispatch of the swipe gesture for one-finger touch swipes.
[chromium-blink-merge.git] / ui / ui_unittests.gyp
blob53e1b060780e129643350e12b53f4384304b316c
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.
6   'variables': {
7     'chromium_code': 1,
8   },
9   'targets': [
10     {
11       'target_name': 'ui_unittests',
12       'type': '<(gtest_target_type)',
13       'dependencies': [
14         '../base/base.gyp:base',
15         '../base/base.gyp:test_support_base',
16         '../skia/skia.gyp:skia',
17         '../testing/gmock.gyp:gmock',
18         '../testing/gtest.gyp:gtest',
19         '../third_party/icu/icu.gyp:icui18n',
20         '../third_party/icu/icu.gyp:icuuc',
21         '../url/url.gyp:url_lib',
22         'base/ui_base.gyp:ui_base',
23         'base/ui_base.gyp:ui_base_test_support',
24         'events/events.gyp:events_base',
25         'gfx/gfx.gyp:gfx_test_support',
26         'resources/ui_resources.gyp:ui_resources',
27         'resources/ui_resources.gyp:ui_test_pak',
28         'strings/ui_strings.gyp:ui_strings',
29       ],
30       # iOS uses a small subset of ui. common_sources are the only files that
31       # are built on iOS.
32       'common_sources' : [
33         'base/layout_unittest.cc',
34         'base/l10n/l10n_util_mac_unittest.mm',
35         'base/l10n/l10n_util_unittest.cc',
36         'base/l10n/l10n_util_win_unittest.cc',
37         'base/l10n/time_format_unittest.cc',
38         'base/models/tree_node_iterator_unittest.cc',
39         'base/resource/data_pack_literal.cc',
40         'base/resource/data_pack_unittest.cc',
41         'base/resource/resource_bundle_unittest.cc',
42         'base/test/run_all_unittests.cc',
43         'gfx/screen_unittest.cc',
44       ],
45       'all_sources': [
46         '<@(_common_sources)',
47         'base/accelerators/accelerator_manager_unittest.cc',
48         'base/accelerators/menu_label_accelerator_util_linux_unittest.cc',
49         'base/clipboard/clipboard_unittest.cc',
50         'base/clipboard/custom_data_helper_unittest.cc',
51         'base/cocoa/base_view_unittest.mm',
52         'base/cocoa/cocoa_base_utils_unittest.mm',
53         'base/cocoa/controls/blue_label_button_unittest.mm',
54         'base/cocoa/controls/hover_image_menu_button_unittest.mm',
55         'base/cocoa/controls/hyperlink_button_cell_unittest.mm',
56         'base/cocoa/focus_tracker_unittest.mm',
57         'base/cocoa/fullscreen_window_manager_unittest.mm',
58         'base/cocoa/hover_image_button_unittest.mm',
59         'base/cocoa/menu_controller_unittest.mm',
60         'base/cocoa/nsgraphics_context_additions_unittest.mm',
61         'base/cocoa/tracking_area_unittest.mm',
62         'base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc',
63         'base/models/list_model_unittest.cc',
64         'base/models/list_selection_model_unittest.cc',
65         'base/models/tree_node_model_unittest.cc',
66         'base/test/data/resource.h',
67         'base/text/bytes_formatting_unittest.cc',
68         'base/view_prop_unittest.cc',
69         'base/webui/web_ui_util_unittest.cc',
70         'gfx/canvas_unittest.cc',
71         'gfx/canvas_unittest_mac.mm',
72         'gfx/platform_font_mac_unittest.mm',
73         'gfx/render_text_unittest.cc',
74       ],
75       'includes': [
76         'display/display_unittests.gypi',
77         'ozone/ozone_unittests.gypi',
78       ],
79       'include_dirs': [
80         '../',
81       ],
82       'conditions': [
83         ['OS!="ios"', {
84           'sources' : ['<@(_all_sources)'],
85           'includes': [
86             'base/ime/ime_unittests.gypi',
87           ],
88         }, {  # OS=="ios"
89           'sources' : [
90             '<@(_common_sources)',
91           ],
92           # The ResourceBundle unittest expects a locale.pak file to exist in
93           # the bundle for English-US. Copy it in from where it was generated
94           # by ui_resources.gyp:ui_test_pak.
95           'mac_bundle_resources': [
96             '<(PRODUCT_DIR)/ui/en.lproj/locale.pak',
97           ],
98         }],
99         ['OS == "win"', {
100           'sources': [
101             'base/dragdrop/os_exchange_data_win_unittest.cc',
102             'base/win/hwnd_subclass_unittest.cc',
103             'gfx/font_fallback_win_unittest.cc',
104             'gfx/icon_util_unittest.cc',
105             'gfx/icon_util_unittests.rc',
106             'gfx/platform_font_win_unittest.cc',
107           ],
108           'include_dirs': [
109             '../..',
110             '../third_party/wtl/include',
111           ],
112           'msvs_settings': {
113             'VCLinkerTool': {
114               'DelayLoadDLLs': [
115                 'd2d1.dll',
116                 'd3d10_1.dll',
117               ],
118               'AdditionalDependencies': [
119                 'd2d1.lib',
120                 'd3d10_1.lib',
121               ],
122             },
123           },
124           'link_settings': {
125             'libraries': [
126               '-limm32.lib',
127               '-loleacc.lib',
128             ],
129           },
130           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
131           'msvs_disabled_warnings': [ 4267, ],
132         }],
133         ['OS == "android"', {
134           'dependencies': [
135             '../testing/android/native_test.gyp:native_test_native_code',
136           ],
137         }],
138         ['use_pango == 1', {
139           'dependencies': [
140             '../build/linux/system.gyp:pangocairo',
141           ],
142           'conditions': [
143             ['use_allocator!="none"', {
144                'dependencies': [
145                  '../base/allocator/allocator.gyp:allocator',
146                ],
147             }],
148           ],
149         }],
150         ['use_x11==1', {
151           'dependencies': [
152             '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
153             'events/platform/x11/x11_events_platform.gyp:x11_events_platform',
154           ],
155         }],
156         ['OS=="android" or OS=="ios"', {
157           'sources!': [
158             'gfx/render_text_unittest.cc',
159           ],
160         }],
161         ['OS!="win" or use_aura==0', {
162           'sources!': [
163             'base/view_prop_unittest.cc',
164           ],
165         }],
166         ['use_x11==1 and use_aura==1',  {
167           'sources': [
168             'base/cursor/cursor_loader_x11_unittest.cc',
169           ],
170         }],
171         ['OS=="mac"',  {
172           'dependencies': [
173             'events/events.gyp:events_test_support',
174             'gfx/gfx.gyp:gfx_test_support',
175             'ui_unittests_bundle',
176           ],
177         }],
178         ['use_aura==1 or toolkit_views==1',  {
179           'sources': [
180             'base/dragdrop/os_exchange_data_unittest.cc',
181           ],
182           'dependencies': [
183             'events/events.gyp:events',
184             'events/events.gyp:events_base',
185             'events/events.gyp:events_test_support',
186             'events/platform/events_platform.gyp:events_platform',
187           ],
188         }],
189         ['use_aura==1', {
190           'sources!': [
191             'base/dragdrop/os_exchange_data_win_unittest.cc',
192             'gfx/screen_unittest.cc',
193           ],
194         }],
195         ['use_ozone==1', {
196           'dependencies': [
197             'gfx/ozone/gfx_ozone.gyp:gfx_ozone',
198           ],
199         }],
200         ['use_ozone==1 and use_pango==0', {
201           'sources!': [
202             'gfx/canvas_unittest.cc',
203             'gfx/render_text_unittest.cc',
204           ],
205         }],
206         ['chromeos==1', {
207           'dependencies': [
208             '../chromeos/chromeos.gyp:chromeos',
209             'aura/aura.gyp:aura_test_support',
210             'chromeos/ui_chromeos.gyp:ui_chromeos',
211           ],
212           'sources': [
213             'chromeos/touch_exploration_controller_unittest.cc'
214           ],
215           'sources!': [
216             'base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc',
217           ],
218         }],
219       ],
220       'target_conditions': [
221         ['OS == "ios"', {
222           'sources/': [
223             # Pull in specific Mac files for iOS (which have been filtered out
224             # by file name rules).
225             ['include', '^base/l10n/l10n_util_mac_unittest\\.mm$'],
226           ],
227         }],
228       ],
229     },
230   ],
231   'conditions': [
232     # Mac target to build a test Framework bundle to mock out resource loading.
233     ['OS == "mac"', {
234       'targets': [
235         {
236           'target_name': 'ui_unittests_bundle',
237           'type': 'shared_library',
238           'dependencies': [
239             'resources/ui_resources.gyp:ui_test_pak',
240           ],
241           'includes': [ 'ui_unittests_bundle.gypi' ],
242         },
243       ],
244     }],
245     ['OS == "android"', {
246       'targets': [
247         {
248           'target_name': 'ui_unittests_apk',
249           'type': 'none',
250           'dependencies': [
251             'ui_unittests',
252           ],
253           'variables': {
254             'test_suite_name': 'ui_unittests',
255           },
256           'includes': [ '../build/apk_test.gypi' ],
257         },
258       ],
259     }],
260   ],