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 # TODO(tfarina): Rename this target to ui_base_unittests.
12 # In order to do this we will need to keep this target, add a dummy
13 # ui_base_unittests target that just points to ui_unittests, change
14 # buildbot code to reference the new 'ui_base_unittests' target.
15 # After buildbot is updated, we can make the changes in Chromium and
16 # remove 'ui_unittests' target. crbug.com/331829
17 'target_name': 'ui_unittests',
18 'type': '<(gtest_target_type)',
20 '../../base/base.gyp:base',
21 '../../base/base.gyp:test_support_base',
22 '../../net/net.gyp:net',
23 '../../skia/skia.gyp:skia',
24 '../../testing/gmock.gyp:gmock',
25 '../../testing/gtest.gyp:gtest',
26 '../../third_party/icu/icu.gyp:icui18n',
27 '../../third_party/icu/icu.gyp:icuuc',
28 '../../url/url.gyp:url_lib',
29 '../events/events.gyp:events_base',
30 '../gfx/gfx.gyp:gfx_test_support',
31 '../resources/ui_resources.gyp:ui_resources',
32 '../resources/ui_resources.gyp:ui_test_pak',
33 '../strings/ui_strings.gyp:ui_strings',
34 'ui_base.gyp:ui_base',
35 'ui_base.gyp:ui_base_test_support',
37 # iOS uses a small subset of ui. common_sources are the only files that
40 # Note: file list duplicated in GN build.
42 'l10n/l10n_util_mac_unittest.mm',
43 'l10n/l10n_util_unittest.cc',
44 'l10n/l10n_util_win_unittest.cc',
45 'l10n/time_format_unittest.cc',
46 'models/tree_node_iterator_unittest.cc',
47 'resource/data_pack_literal.cc',
48 'resource/data_pack_unittest.cc',
49 'resource/resource_bundle_unittest.cc',
50 'test/run_all_unittests.cc',
53 # Note: file list duplicated in GN build.
54 '<@(_common_sources)',
55 'accelerators/accelerator_manager_unittest.cc',
56 'accelerators/menu_label_accelerator_util_linux_unittest.cc',
57 'clipboard/custom_data_helper_unittest.cc',
58 'cocoa/base_view_unittest.mm',
59 'cocoa/cocoa_base_utils_unittest.mm',
60 'cocoa/controls/blue_label_button_unittest.mm',
61 'cocoa/controls/hover_image_menu_button_unittest.mm',
62 'cocoa/controls/hyperlink_button_cell_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/nsgraphics_context_additions_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 'text/bytes_formatting_unittest.cc',
83 'view_prop_unittest.cc',
84 'webui/web_ui_util_unittest.cc',
85 'x/selection_requestor_unittest.cc',
92 'sources' : ['<@(_all_sources)'],
95 '<@(_common_sources)',
97 # The ResourceBundle unittest expects a locale.pak file to exist in
98 # the bundle for English-US. Copy it in from where it was generated
99 # by ui_resources.gyp:ui_test_pak.
100 'mac_bundle_resources': [
101 '<(PRODUCT_DIR)/ui/en.lproj/locale.pak',
105 'action_name': 'copy_test_data',
110 'test_data_prefix' : 'base',
112 'includes': [ '../../build/copy_test_data_ios.gypi' ],
118 'dragdrop/os_exchange_data_win_unittest.cc',
119 'win/hwnd_subclass_unittest.cc',
120 'win/open_file_name_win_unittest.cc',
128 'AdditionalDependencies': [
140 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
141 'msvs_disabled_warnings': [ 4267, ],
143 ['OS == "android"', {
145 '../../testing/android/native_test.gyp:native_test_native_code',
150 '../../build/linux/system.gyp:pangocairo',
153 ['use_allocator!="none"', {
155 '../../base/allocator/allocator.gyp:allocator',
162 '../../build/linux/system.gyp:x11',
163 '../../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
164 '../events/platform/x11/x11_events_platform.gyp:x11_events_platform',
165 '../gfx/x/gfx_x11.gyp:gfx_x11',
168 ['OS!="win" or use_aura==0', {
170 'view_prop_unittest.cc',
173 ['use_x11==1 and use_aura==1', {
175 'cursor/cursor_loader_x11_unittest.cc',
180 '../../third_party/mozilla/mozilla.gyp:mozilla',
181 '../events/events.gyp:events_test_support',
182 'ui_base_tests_bundle',
185 ['component=="static_library"', {
186 # Needed for mozilla.gyp.
187 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
191 ['use_aura==1 or toolkit_views==1', {
193 'dragdrop/os_exchange_data_unittest.cc',
196 '../events/events.gyp:events',
197 '../events/events.gyp:events_base',
198 '../events/events.gyp:events_test_support',
199 '../events/platform/events_platform.gyp:events_platform',
204 '../../chromeos/chromeos.gyp:chromeos',
205 '../aura/aura.gyp:aura_test_support',
206 '../chromeos/ui_chromeos.gyp:ui_chromeos',
207 '../events/events.gyp:gesture_detection',
210 '../chromeos/touch_exploration_controller_unittest.cc'
213 'dragdrop/os_exchange_data_provider_aurax11_unittest.cc',
214 'x/selection_requestor_unittest.cc',
219 'ime/chromeos/character_composer_unittest.cc',
220 'ime/input_method_chromeos_unittest.cc',
221 'ime/composition_text_util_pango_unittest.cc',
225 'target_conditions': [
228 # Pull in specific Mac files for iOS (which have been filtered out
229 # by file name rules).
230 ['include', '^l10n/l10n_util_mac_unittest\\.mm$'],
237 # Mac target to build a test Framework bundle to mock out resource loading.
241 'target_name': 'ui_base_tests_bundle',
242 'type': 'shared_library',
244 '../resources/ui_resources.gyp:ui_test_pak',
246 'includes': [ 'ui_base_tests_bundle.gypi' ],
250 ['OS == "android"', {
253 'target_name': 'ui_unittests_apk',
259 'test_suite_name': 'ui_unittests',
261 'includes': [ '../../build/apk_test.gypi' ],