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.
11 # GN version: //ui/base:unittests
12 'target_name': 'ui_base_unittests',
13 'type': '<(gtest_target_type)',
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',
33 # iOS uses a small subset of ui. common_sources are the only files that
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',
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 'template_expressions_unittest.cc',
48 'test/run_all_unittests.cc',
51 # Note: file list duplicated in GN build.
52 '<@(_common_sources)',
53 'accelerators/accelerator_manager_unittest.cc',
54 'accelerators/menu_label_accelerator_util_linux_unittest.cc',
55 'clipboard/custom_data_helper_unittest.cc',
56 'cocoa/base_view_unittest.mm',
57 'cocoa/cocoa_base_utils_unittest.mm',
58 'cocoa/constrained_window/constrained_window_animation_unittest.mm',
59 'cocoa/controls/blue_label_button_unittest.mm',
60 'cocoa/controls/hover_image_menu_button_unittest.mm',
61 'cocoa/controls/hyperlink_button_cell_unittest.mm',
62 'cocoa/controls/hyperlink_text_view_unittest.mm',
63 'cocoa/focus_tracker_unittest.mm',
64 'cocoa/fullscreen_window_manager_unittest.mm',
65 'cocoa/hover_image_button_unittest.mm',
66 'cocoa/menu_controller_unittest.mm',
67 'cocoa/nscolor_additions_unittest.mm',
68 'cocoa/nsgraphics_context_additions_unittest.mm',
69 'cocoa/nsview_additions_unittest.mm',
70 'cocoa/three_part_image_unittest.mm',
71 'cocoa/tracking_area_unittest.mm',
72 'dragdrop/os_exchange_data_provider_aurax11_unittest.cc',
73 'ime/candidate_window_unittest.cc',
74 'ime/chromeos/character_composer_unittest.cc',
75 'ime/chromeos/composition_text_chromeos_unittest.cc',
76 'ime/composition_text_util_pango_unittest.cc',
77 'ime/input_method_base_unittest.cc',
78 'ime/input_method_chromeos_unittest.cc',
79 'ime/remote_input_method_win_unittest.cc',
80 'ime/win/imm32_manager_unittest.cc',
81 'ime/win/tsf_input_scope_unittest.cc',
82 'models/list_model_unittest.cc',
83 'models/list_selection_model_unittest.cc',
84 'models/tree_node_model_unittest.cc',
85 'resource/material_design/material_design_controller_unittest.cc',
86 'test/data/resource.h',
87 'test/test_clipboard_unittest.cc',
88 'test/scoped_fake_nswindow_fullscreen_unittest.mm',
89 'text/bytes_formatting_unittest.cc',
90 'touch/selection_bound_unittest.cc',
91 'user_activity/user_activity_detector_unittest.cc',
92 'view_prop_unittest.cc',
93 'webui/web_ui_util_unittest.cc',
94 'x/selection_requestor_unittest.cc',
101 'sources' : [ '<@(_all_sources)' ],
103 'sources' : [ '<@(_common_sources)' ],
104 # The ResourceBundle unittest expects a locale.pak file to exist in
105 # the bundle for English-US. Copy it in from where it was generated
106 # by ui_resources.gyp:ui_test_pak.
107 'mac_bundle_resources': [
108 '<(PRODUCT_DIR)/ui/en.lproj/locale.pak',
112 'action_name': 'copy_test_data',
117 'test_data_prefix' : 'ui/base',
119 'includes': [ '../../build/copy_test_data_ios.gypi' ],
123 ['OS == "linux" and use_aura==1 and chromeos==0', {
125 'ime/input_method_auralinux_unittest.cc',
130 'dragdrop/os_exchange_data_win_unittest.cc',
131 'win/hwnd_subclass_unittest.cc',
132 'win/open_file_name_win_unittest.cc',
140 'AdditionalDependencies': [
152 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
153 'msvs_disabled_warnings': [ 4267, ],
155 ['OS == "android"', {
157 '../../testing/android/native_test.gyp:native_test_native_code',
160 'touch/selection_bound_unittest.cc',
161 'user_activity/user_activity_detector_unittest.cc',
166 '../../build/linux/system.gyp:pangocairo',
169 ['use_allocator!="none"', {
171 '../../base/allocator/allocator.gyp:allocator',
178 '../../build/linux/system.gyp:x11',
179 '../../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
180 '../events/platform/x11/x11_events_platform.gyp:x11_events_platform',
181 '../gfx/x/gfx_x11.gyp:gfx_x11',
184 ['OS!="win" or use_aura==0', {
186 'view_prop_unittest.cc',
189 ['use_x11==1 and use_aura==1', {
191 'cursor/cursor_loader_x11_unittest.cc',
196 '../../third_party/mozilla/mozilla.gyp:mozilla',
197 '../events/events.gyp:events_test_support',
198 'ui_base_tests_bundle',
201 ['component=="static_library"', {
202 # Needed for mozilla.gyp.
203 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
207 ['use_aura==1 or toolkit_views==1', {
209 'dragdrop/os_exchange_data_unittest.cc',
212 '../events/events.gyp:events',
213 '../events/events.gyp:events_base',
214 '../events/events.gyp:events_test_support',
215 '../events/platform/events_platform.gyp:events_platform',
220 '../../chromeos/chromeos.gyp:chromeos',
223 'dragdrop/os_exchange_data_provider_aurax11_unittest.cc',
224 'x/selection_requestor_unittest.cc',
229 'ime/composition_text_util_pango_unittest.cc',
230 'ime/input_method_chromeos_unittest.cc',
234 'target_conditions': [
237 # Pull in specific Mac files for iOS (which have been filtered out
238 # by file name rules).
239 ['include', '^l10n/l10n_util_mac_unittest\\.mm$'],
246 # Mac target to build a test Framework bundle to mock out resource loading.
250 'target_name': 'ui_base_tests_bundle',
251 'type': 'shared_library',
253 '../resources/ui_resources.gyp:ui_test_pak',
255 'includes': [ 'ui_base_tests_bundle.gypi' ],
256 # ui_base_tests_bundle doesn't actually contain a shared library and
257 # therefore should not depend on sanitizer_options or any other
258 # libraries. Adding such a dependency will result in creating a
259 # broken shared library within the bundle.
261 ['use_sanitizer_options==1', {
263 '../../build/sanitizers/sanitizers.gyp:sanitizer_options',
270 ['OS == "android"', {
273 'target_name': 'ui_base_unittests_apk',
276 # TODO(tfarina): This is a layer violation and should be removed.
278 # For now this is here as a temporary band-aid to fix the clobber
279 # issue we are seeing when running this target on Android.
281 '../../chrome/chrome_resources.gyp:packed_resources',
285 'test_suite_name': 'ui_base_unittests',
286 'isolate_file': 'ui_base_tests.isolate',
288 'includes': [ '../../build/apk_test.gypi' ],
292 ['test_isolation_mode != "noop"', {
295 'target_name': 'ui_base_unittests_run',
301 '../../build/isolate.gypi',
304 'ui_base_unittests.isolate',
309 '../../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',