[SyncFS] Build indexes from FileTracker entries on disk.
[chromium-blink-merge.git] / ui / ui_unittests.gyp
blobad33a510a02e72d0511f460da8232ab5ebbe8eb9
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         '../net/net.gyp:net',
17         '../skia/skia.gyp:skia',
18         '../testing/gmock.gyp:gmock',
19         '../testing/gtest.gyp:gtest',
20         '../third_party/icu/icu.gyp:icui18n',
21         '../third_party/icu/icu.gyp:icuuc',
22         '../url/url.gyp:url_lib',
23         'base/ui_base.gyp:ui_base',
24         'base/ui_base.gyp:ui_base_test_support',
25         'events/events.gyp:events_base',
26         'gfx/gfx.gyp:gfx_test_support',
27         'resources/ui_resources.gyp:ui_resources',
28         'resources/ui_resources.gyp:ui_test_pak',
29         'strings/ui_strings.gyp:ui_strings',
30       ],
31       # iOS uses a small subset of ui. common_sources are the only files that
32       # are built on iOS.
33       'common_sources' : [
34         'base/layout_unittest.cc',
35         'base/l10n/l10n_util_mac_unittest.mm',
36         'base/l10n/l10n_util_unittest.cc',
37         'base/l10n/l10n_util_win_unittest.cc',
38         'base/l10n/time_format_unittest.cc',
39         'base/models/tree_node_iterator_unittest.cc',
40         'base/resource/data_pack_literal.cc',
41         'base/resource/data_pack_unittest.cc',
42         'base/resource/resource_bundle_unittest.cc',
43         'base/test/run_all_unittests.cc',
44         'gfx/screen_unittest.cc',
45       ],
46       'all_sources': [
47         '<@(_common_sources)',
48         'base/accelerators/accelerator_manager_unittest.cc',
49         'base/accelerators/menu_label_accelerator_util_linux_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_mac.mm',
71         'gfx/platform_font_mac_unittest.mm',
72       ],
73       'include_dirs': [
74         '../',
75       ],
76       'conditions': [
77         ['OS!="ios"', {
78           'sources' : ['<@(_all_sources)'],
79           'includes': [
80             'base/ime/ime_unittests.gypi',
81           ],
82         }, {  # OS=="ios"
83           'sources' : [
84             '<@(_common_sources)',
85           ],
86           # The ResourceBundle unittest expects a locale.pak file to exist in
87           # the bundle for English-US. Copy it in from where it was generated
88           # by ui_resources.gyp:ui_test_pak.
89           'mac_bundle_resources': [
90             '<(PRODUCT_DIR)/ui/en.lproj/locale.pak',
91           ],
92           'actions': [
93             {
94               'action_name': 'copy_test_data',
95               'variables': {
96                 'test_data_files': [
97                   'base/test/data',
98                 ],
99                 'test_data_prefix' : 'ui',
100               },
101               'includes': [ '../build/copy_test_data_ios.gypi' ],
102             },
103           ],
104         }],
105         ['OS == "win"', {
106           'sources': [
107             'base/dragdrop/os_exchange_data_win_unittest.cc',
108             'base/win/hwnd_subclass_unittest.cc',
109             'gfx/color_profile_win_unittest.cc',
110             'gfx/font_fallback_win_unittest.cc',
111             'gfx/icon_util_unittest.cc',
112             'gfx/icon_util_unittests.rc',
113             'gfx/platform_font_win_unittest.cc',
114           ],
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             },
130           },
131           'link_settings': {
132             'libraries': [
133               '-limm32.lib',
134               '-loleacc.lib',
135             ],
136           },
137           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
138           'msvs_disabled_warnings': [ 4267, ],
139         }],
140         ['OS == "android"', {
141           'dependencies': [
142             '../testing/android/native_test.gyp:native_test_native_code',
143           ],
144         }],
145         ['use_pango == 1', {
146           'dependencies': [
147             '../build/linux/system.gyp:pangocairo',
148           ],
149           'conditions': [
150             ['use_allocator!="none"', {
151                'dependencies': [
152                  '../base/allocator/allocator.gyp:allocator',
153                ],
154             }],
155           ],
156         }],
157         ['use_x11==1', {
158           'dependencies': [
159             '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
160             'events/platform/x11/x11_events_platform.gyp:x11_events_platform',
161           ],
162         }],
163         ['OS!="win" or use_aura==0', {
164           'sources!': [
165             'base/view_prop_unittest.cc',
166           ],
167         }],
168         ['use_x11==1 and use_aura==1',  {
169           'sources': [
170             'base/cursor/cursor_loader_x11_unittest.cc',
171           ],
172         }],
173         ['OS=="mac"',  {
174           'dependencies': [
175             '../third_party/mozilla/mozilla.gyp:mozilla',
176             'events/events.gyp:events_test_support',
177             'gfx/gfx.gyp:gfx_test_support',
178             'ui_unittests_bundle',
179           ],
180           'conditions': [
181             ['component=="static_library"', {
182               # Needed for mozilla.gyp.
183               'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
184             }],
185           ],
186         }],
187         ['use_aura==1 or toolkit_views==1',  {
188           'sources': [
189             'base/dragdrop/os_exchange_data_unittest.cc',
190           ],
191           'dependencies': [
192             'events/events.gyp:events',
193             'events/events.gyp:events_base',
194             'events/events.gyp:events_test_support',
195             'events/platform/events_platform.gyp:events_platform',
196           ],
197         }],
198         ['use_aura==1', {
199           'sources!': [
200             'base/dragdrop/os_exchange_data_win_unittest.cc',
201             'gfx/screen_unittest.cc',
202           ],
203         }],
204         ['chromeos==1', {
205           'dependencies': [
206             '../chromeos/chromeos.gyp:chromeos',
207             'aura/aura.gyp:aura_test_support',
208             'chromeos/ui_chromeos.gyp:ui_chromeos',
209             'events/events.gyp:gesture_detection',
210           ],
211           'sources': [
212             'chromeos/touch_exploration_controller_unittest.cc'
213           ],
214           'sources!': [
215             'base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc',
216           ],
217         }],
218       ],
219       'target_conditions': [
220         ['OS == "ios"', {
221           'sources/': [
222             # Pull in specific Mac files for iOS (which have been filtered out
223             # by file name rules).
224             ['include', '^base/l10n/l10n_util_mac_unittest\\.mm$'],
225           ],
226         }],
227       ],
228     },
229   ],
230   'conditions': [
231     # Mac target to build a test Framework bundle to mock out resource loading.
232     ['OS == "mac"', {
233       'targets': [
234         {
235           'target_name': 'ui_unittests_bundle',
236           'type': 'shared_library',
237           'dependencies': [
238             'resources/ui_resources.gyp:ui_test_pak',
239           ],
240           'includes': [ 'ui_unittests_bundle.gypi' ],
241         },
242       ],
243     }],
244     ['OS == "android"', {
245       'targets': [
246         {
247           'target_name': 'ui_unittests_apk',
248           'type': 'none',
249           'dependencies': [
250             'ui_unittests',
251           ],
252           'variables': {
253             'test_suite_name': 'ui_unittests',
254           },
255           'includes': [ '../build/apk_test.gypi' ],
256         },
257       ],
258     }],
259   ],