Map WebSocket URL schemes to HTTP URL schemes for auth purposes.
[chromium-blink-merge.git] / ui / ui_unittests.gyp
blob7b64deae50632335eb0bf82dbf4dbe1d9e82d9be
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/custom_data_helper_unittest.cc',
50         'base/cocoa/base_view_unittest.mm',
51         'base/cocoa/cocoa_base_utils_unittest.mm',
52         'base/cocoa/controls/blue_label_button_unittest.mm',
53         'base/cocoa/controls/hover_image_menu_button_unittest.mm',
54         'base/cocoa/controls/hyperlink_button_cell_unittest.mm',
55         'base/cocoa/focus_tracker_unittest.mm',
56         'base/cocoa/fullscreen_window_manager_unittest.mm',
57         'base/cocoa/hover_image_button_unittest.mm',
58         'base/cocoa/menu_controller_unittest.mm',
59         'base/cocoa/nsgraphics_context_additions_unittest.mm',
60         'base/cocoa/tracking_area_unittest.mm',
61         'base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc',
62         'base/models/list_model_unittest.cc',
63         'base/models/list_selection_model_unittest.cc',
64         'base/models/tree_node_model_unittest.cc',
65         'base/test/data/resource.h',
66         'base/text/bytes_formatting_unittest.cc',
67         'base/view_prop_unittest.cc',
68         'base/webui/web_ui_util_unittest.cc',
69         'gfx/canvas_unittest_mac.mm',
70         'gfx/platform_font_mac_unittest.mm',
71       ],
72       'include_dirs': [
73         '../',
74       ],
75       'conditions': [
76         ['OS!="ios"', {
77           'sources' : ['<@(_all_sources)'],
78           'includes': [
79             'base/ime/ime_unittests.gypi',
80           ],
81         }, {  # OS=="ios"
82           'sources' : [
83             '<@(_common_sources)',
84           ],
85           # The ResourceBundle unittest expects a locale.pak file to exist in
86           # the bundle for English-US. Copy it in from where it was generated
87           # by ui_resources.gyp:ui_test_pak.
88           'mac_bundle_resources': [
89             '<(PRODUCT_DIR)/ui/en.lproj/locale.pak',
90           ],
91           'actions': [
92             {
93               'action_name': 'copy_test_data',
94               'variables': {
95                 'test_data_files': [
96                   'base/test/data',
97                 ],
98                 'test_data_prefix' : 'ui',
99               },
100               'includes': [ '../build/copy_test_data_ios.gypi' ],
101             },
102           ],
103         }],
104         ['OS == "win"', {
105           'sources': [
106             'base/dragdrop/os_exchange_data_win_unittest.cc',
107             'base/win/hwnd_subclass_unittest.cc',
108             'gfx/color_profile_win_unittest.cc',
109             'gfx/font_fallback_win_unittest.cc',
110             'gfx/icon_util_unittest.cc',
111             'gfx/icon_util_unittests.rc',
112             'gfx/platform_font_win_unittest.cc',
113           ],
114           'include_dirs': [
115             '../..',
116             '../third_party/wtl/include',
117           ],
118           'msvs_settings': {
119             'VCLinkerTool': {
120               'DelayLoadDLLs': [
121                 'd2d1.dll',
122                 'd3d10_1.dll',
123               ],
124               'AdditionalDependencies': [
125                 'd2d1.lib',
126                 'd3d10_1.lib',
127               ],
128             },
129           },
130           'link_settings': {
131             'libraries': [
132               '-limm32.lib',
133               '-loleacc.lib',
134             ],
135           },
136           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
137           'msvs_disabled_warnings': [ 4267, ],
138         }],
139         ['OS == "android"', {
140           'dependencies': [
141             '../testing/android/native_test.gyp:native_test_native_code',
142           ],
143         }],
144         ['use_pango == 1', {
145           'dependencies': [
146             '../build/linux/system.gyp:pangocairo',
147           ],
148           'conditions': [
149             ['use_allocator!="none"', {
150                'dependencies': [
151                  '../base/allocator/allocator.gyp:allocator',
152                ],
153             }],
154           ],
155         }],
156         ['use_x11==1', {
157           'dependencies': [
158             '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
159             'events/platform/x11/x11_events_platform.gyp:x11_events_platform',
160           ],
161         }],
162         ['OS!="win" or use_aura==0', {
163           'sources!': [
164             'base/view_prop_unittest.cc',
165           ],
166         }],
167         ['use_x11==1 and use_aura==1',  {
168           'sources': [
169             'base/cursor/cursor_loader_x11_unittest.cc',
170           ],
171         }],
172         ['OS=="mac"',  {
173           'dependencies': [
174             '../third_party/mozilla/mozilla.gyp:mozilla',
175             'events/events.gyp:events_test_support',
176             'gfx/gfx.gyp:gfx_test_support',
177             'ui_unittests_bundle',
178           ],
179           'conditions': [
180             ['component=="static_library"', {
181               # Needed for mozilla.gyp.
182               'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
183             }],
184           ],
185         }],
186         ['use_aura==1 or toolkit_views==1',  {
187           'sources': [
188             'base/dragdrop/os_exchange_data_unittest.cc',
189           ],
190           'dependencies': [
191             'events/events.gyp:events',
192             'events/events.gyp:events_base',
193             'events/events.gyp:events_test_support',
194             'events/platform/events_platform.gyp:events_platform',
195           ],
196         }],
197         ['use_aura==1', {
198           'sources!': [
199             'base/dragdrop/os_exchange_data_win_unittest.cc',
200             'gfx/screen_unittest.cc',
201           ],
202         }],
203         ['chromeos==1', {
204           'dependencies': [
205             '../chromeos/chromeos.gyp:chromeos',
206             'aura/aura.gyp:aura_test_support',
207             'chromeos/ui_chromeos.gyp:ui_chromeos',
208             'events/events.gyp:gesture_detection',
209           ],
210           'sources': [
211             'chromeos/touch_exploration_controller_unittest.cc'
212           ],
213           'sources!': [
214             'base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc',
215           ],
216         }],
217       ],
218       'target_conditions': [
219         ['OS == "ios"', {
220           'sources/': [
221             # Pull in specific Mac files for iOS (which have been filtered out
222             # by file name rules).
223             ['include', '^base/l10n/l10n_util_mac_unittest\\.mm$'],
224           ],
225         }],
226       ],
227     },
228   ],
229   'conditions': [
230     # Mac target to build a test Framework bundle to mock out resource loading.
231     ['OS == "mac"', {
232       'targets': [
233         {
234           'target_name': 'ui_unittests_bundle',
235           'type': 'shared_library',
236           'dependencies': [
237             'resources/ui_resources.gyp:ui_test_pak',
238           ],
239           'includes': [ 'ui_unittests_bundle.gypi' ],
240         },
241       ],
242     }],
243     ['OS == "android"', {
244       'targets': [
245         {
246           'target_name': 'ui_unittests_apk',
247           'type': 'none',
248           'dependencies': [
249             'ui_unittests',
250           ],
251           'variables': {
252             'test_suite_name': 'ui_unittests',
253           },
254           'includes': [ '../build/apk_test.gypi' ],
255         },
256       ],
257     }],
258   ],