DevTools: kill codeschool extension from whitelist
[chromium-blink-merge.git] / ui / base / ui_base_tests.gyp
blob8871848be801ffddf32cb642f0f1d53a653908cc
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       # GN version: //ui/base:unittests
12       'target_name': 'ui_base_unittests',
13       'type': '<(gtest_target_type)',
14       'dependencies': [
15         '../../base/base.gyp:base',
16         '../../base/base.gyp:test_support_base',
17         '../../net/net.gyp:net',
18         '../../skia/skia.gyp:skia',
19         '../../testing/gmock.gyp:gmock',
20         '../../testing/gtest.gyp:gtest',
21         '../../third_party/icu/icu.gyp:icui18n',
22         '../../third_party/icu/icu.gyp:icuuc',
23         '../../url/url.gyp:url_lib',
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         'ime/ui_base_ime.gyp:ui_base_ime',
30         'ui_base.gyp:ui_base',
31         'ui_base.gyp:ui_base_test_support',
32       ],
33       # iOS uses a small subset of ui. common_sources are the only files that
34       # are built on iOS.
35       'common_sources' : [
36         # Note: file list duplicated in GN build.
37         'ios/cru_context_menu_controller_unittest.mm',
38         'l10n/l10n_util_mac_unittest.mm',
39         'l10n/l10n_util_unittest.cc',
40         'l10n/l10n_util_win_unittest.cc',
41         'l10n/time_format_unittest.cc',
42         'layout_unittest.cc',
43         'models/tree_node_iterator_unittest.cc',
44         'resource/data_pack_literal.cc',
45         'resource/data_pack_unittest.cc',
46         'resource/resource_bundle_unittest.cc',
47         'test/run_all_unittests.cc',
48       ],
49       'all_sources': [
50         # Note: file list duplicated in GN build.
51         '<@(_common_sources)',
52         'accelerators/accelerator_manager_unittest.cc',
53         'accelerators/menu_label_accelerator_util_linux_unittest.cc',
54         'clipboard/custom_data_helper_unittest.cc',
55         'cocoa/base_view_unittest.mm',
56         'cocoa/cocoa_base_utils_unittest.mm',
57         'cocoa/controls/blue_label_button_unittest.mm',
58         'cocoa/controls/hover_image_menu_button_unittest.mm',
59         'cocoa/controls/hyperlink_button_cell_unittest.mm',
60         'cocoa/controls/hyperlink_text_view_unittest.mm',
61         'cocoa/focus_tracker_unittest.mm',
62         'cocoa/fullscreen_window_manager_unittest.mm',
63         'cocoa/hover_image_button_unittest.mm',
64         'cocoa/menu_controller_unittest.mm',
65         'cocoa/nsgraphics_context_additions_unittest.mm',
66         'cocoa/nsview_additions_unittest.mm',
67         'cocoa/three_part_image_unittest.mm',
68         'cocoa/tracking_area_unittest.mm',
69         'dragdrop/os_exchange_data_provider_aurax11_unittest.cc',
70         'ime/candidate_window_unittest.cc',
71         'ime/chromeos/character_composer_unittest.cc',
72         'ime/composition_text_util_pango_unittest.cc',
73         'ime/input_method_base_unittest.cc',
74         'ime/input_method_chromeos_unittest.cc',
75         'ime/remote_input_method_win_unittest.cc',
76         'ime/win/imm32_manager_unittest.cc',
77         'ime/win/tsf_input_scope_unittest.cc',
78         'models/list_model_unittest.cc',
79         'models/list_selection_model_unittest.cc',
80         'models/tree_node_model_unittest.cc',
81         'test/data/resource.h',
82         'test/test_clipboard_unittest.cc',
83         'text/bytes_formatting_unittest.cc',
84         'touch/selection_bound_unittest.cc',
85         'user_activity/user_activity_detector_unittest.cc',
86         'view_prop_unittest.cc',
87         'webui/web_ui_util_unittest.cc',
88         'x/selection_requestor_unittest.cc',
89       ],
90       'include_dirs': [
91         '../..',
92       ],
93       'conditions': [
94         ['OS!="ios"', {
95           'sources' : [ '<@(_all_sources)' ],
96         }, {  # OS=="ios"
97           'sources' : [ '<@(_common_sources)' ],
98           # The ResourceBundle unittest expects a locale.pak file to exist in
99           # the bundle for English-US. Copy it in from where it was generated
100           # by ui_resources.gyp:ui_test_pak.
101           'mac_bundle_resources': [
102             '<(PRODUCT_DIR)/ui/en.lproj/locale.pak',
103           ],
104           'actions': [
105             {
106               'action_name': 'copy_test_data',
107               'variables': {
108                 'test_data_files': [
109                   'test/data',
110                 ],
111                 'test_data_prefix' : 'ui/base',
112               },
113               'includes': [ '../../build/copy_test_data_ios.gypi' ],
114             },
115           ],
116         }],
117         ['OS == "linux" and use_aura==1 and chromeos==0', {
118           'sources': [
119             'ime/input_method_auralinux_unittest.cc',
120           ]
121         }],
122         ['OS == "win"', {
123           'sources': [
124             'dragdrop/os_exchange_data_win_unittest.cc',
125             'win/hwnd_subclass_unittest.cc',
126             'win/open_file_name_win_unittest.cc',
127           ],
128           'msvs_settings': {
129             'VCLinkerTool': {
130               'DelayLoadDLLs': [
131                 'd2d1.dll',
132                 'd3d10_1.dll',
133               ],
134               'AdditionalDependencies': [
135                 'd2d1.lib',
136                 'd3d10_1.lib',
137               ],
138             },
139           },
140           'link_settings': {
141             'libraries': [
142               '-limm32.lib',
143               '-loleacc.lib',
144             ],
145           },
146           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
147           'msvs_disabled_warnings': [ 4267, ],
148         }],
149         ['OS == "android"', {
150           'dependencies': [
151             '../../testing/android/native_test.gyp:native_test_native_code',
152           ],
153           'sources!': [
154             'touch/selection_bound_unittest.cc',
155             'user_activity/user_activity_detector_unittest.cc',
156           ],
157         }],
158         ['use_pango == 1', {
159           'dependencies': [
160             '../../build/linux/system.gyp:pangocairo',
161           ],
162           'conditions': [
163             ['use_allocator!="none"', {
164               'dependencies': [
165                 '../../base/allocator/allocator.gyp:allocator',
166               ],
167             }],
168           ],
169         }],
170         ['use_x11==1', {
171           'dependencies': [
172             '../../build/linux/system.gyp:x11',
173             '../../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
174             '../events/platform/x11/x11_events_platform.gyp:x11_events_platform',
175             '../gfx/x/gfx_x11.gyp:gfx_x11',
176           ],
177         }],
178         ['OS!="win" or use_aura==0', {
179           'sources!': [
180             'view_prop_unittest.cc',
181           ],
182         }],
183         ['use_x11==1 and use_aura==1',  {
184           'sources': [
185             'cursor/cursor_loader_x11_unittest.cc',
186           ],
187         }],
188         ['OS=="mac"',  {
189           'dependencies': [
190             '../../third_party/mozilla/mozilla.gyp:mozilla',
191             '../events/events.gyp:events_test_support',
192             'ui_base_tests_bundle',
193           ],
194           'conditions': [
195             ['component=="static_library"', {
196               # Needed for mozilla.gyp.
197               'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
198             }],
199           ],
200         }],
201         ['use_aura==1 or toolkit_views==1',  {
202           'sources': [
203             'dragdrop/os_exchange_data_unittest.cc',
204           ],
205           'dependencies': [
206             '../events/events.gyp:events',
207             '../events/events.gyp:events_base',
208             '../events/events.gyp:events_test_support',
209             '../events/platform/events_platform.gyp:events_platform',
210           ],
211         }],
212         ['chromeos==1', {
213           'dependencies': [
214             '../../chromeos/chromeos.gyp:chromeos',
215           ],
216           'sources!': [
217             'dragdrop/os_exchange_data_provider_aurax11_unittest.cc',
218             'x/selection_requestor_unittest.cc',
219           ],
220         }],
221         ['use_x11==0', {
222           'sources!': [
223             'ime/chromeos/character_composer_unittest.cc',
224             'ime/composition_text_util_pango_unittest.cc',
225             'ime/input_method_chromeos_unittest.cc',
226           ],
227         }],
228       ],
229       'target_conditions': [
230         ['OS == "ios"', {
231           'sources/': [
232             # Pull in specific Mac files for iOS (which have been filtered out
233             # by file name rules).
234             ['include', '^l10n/l10n_util_mac_unittest\\.mm$'],
235           ],
236         }],
237       ],
238     },
239   ],
240   'conditions': [
241     # Mac target to build a test Framework bundle to mock out resource loading.
242     ['OS == "mac"', {
243       'targets': [
244         {
245           'target_name': 'ui_base_tests_bundle',
246           'type': 'shared_library',
247           'dependencies': [
248             '../resources/ui_resources.gyp:ui_test_pak',
249           ],
250           'includes': [ 'ui_base_tests_bundle.gypi' ],
251           # ui_base_tests_bundle doesn't actually contain a shared library and
252           # therefore should not depend on sanitizer_options or any other
253           # libraries. Adding such a dependency will result in creating a
254           # broken shared library within the bundle.
255           'conditions': [
256             ['use_sanitizer_options==1', {
257               'dependencies!': [
258                 '../../build/sanitizers/sanitizers.gyp:sanitizer_options',
259               ],
260             }],
261           ],
262         },
263       ],
264     }],
265     ['OS == "android"', {
266       'targets': [
267         {
268           'target_name': 'ui_base_unittests_apk',
269           'type': 'none',
270           'dependencies': [
271             # TODO(tfarina): This is a layer violation and should be removed.
272             # crbug.com/176960
273             # For now this is here as a temporary band-aid to fix the clobber
274             # issue we are seeing when running this target on Android.
275             # crbug.com/374490
276             '../../chrome/chrome_resources.gyp:packed_resources',
277             'ui_base_unittests',
278           ],
279           'variables': {
280             'test_suite_name': 'ui_base_unittests',
281           },
282           'includes': [ '../../build/apk_test.gypi' ],
283         },
284       ],
285     }],
286     ['test_isolation_mode != "noop"', {
287       'targets': [
288         {
289           'target_name': 'ui_base_unittests_run',
290           'type': 'none',
291           'dependencies': [
292             'ui_base_unittests',
293           ],
294           'includes': [
295             '../../build/isolate.gypi',
296           ],
297           'sources': [
298             'ui_base_unittests.isolate',
299           ],
300           'conditions': [
301             ['use_x11 == 1', {
302               'dependencies': [
303                 '../../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
304               ],
305             }],
306           ],
307         },
308       ],
309     }],
310   ],