OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
6 'variables': { | 6 'variables': { |
7 'chromium_code': 1, | 7 'chromium_code': 1, |
8 }, | 8 }, |
9 'targets': [ | 9 'targets': [ |
10 { | 10 { |
11 # TODO(tfarina): Remove this target after all traces of it are updated to | |
12 # point to ui_base_unittests. That means updating buildbot code and some | |
13 # references in chromium too. crbug.com/331829 | |
14 # GN version: //ui/base:unittests | |
15 'target_name': 'ui_unittests', | |
16 'includes': [ 'ui_base_tests.gypi' ], | |
17 }, | |
18 { | |
19 # GN version: //ui/base:unittests | 11 # GN version: //ui/base:unittests |
20 'target_name': 'ui_base_unittests', | 12 'target_name': 'ui_base_unittests', |
21 # TODO(tfarina): When ui_unittests is removed, move the content of the | 13 'type': '<(gtest_target_type)', |
22 # gypi file back here. | 14 'dependencies': [ |
23 'includes': [ 'ui_base_tests.gypi' ], | 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 'ui_base.gyp:ui_base', |
| 30 'ui_base.gyp:ui_base_test_support', |
| 31 ], |
| 32 # iOS uses a small subset of ui. common_sources are the only files that |
| 33 # are built on iOS. |
| 34 'common_sources' : [ |
| 35 # Note: file list duplicated in GN build. |
| 36 'layout_unittest.cc', |
| 37 'l10n/l10n_util_mac_unittest.mm', |
| 38 'l10n/l10n_util_unittest.cc', |
| 39 'l10n/l10n_util_win_unittest.cc', |
| 40 'l10n/time_format_unittest.cc', |
| 41 'models/tree_node_iterator_unittest.cc', |
| 42 'resource/data_pack_literal.cc', |
| 43 'resource/data_pack_unittest.cc', |
| 44 'resource/resource_bundle_unittest.cc', |
| 45 'test/run_all_unittests.cc', |
| 46 ], |
| 47 'all_sources': [ |
| 48 # Note: file list duplicated in GN build. |
| 49 '<@(_common_sources)', |
| 50 'accelerators/accelerator_manager_unittest.cc', |
| 51 'accelerators/menu_label_accelerator_util_linux_unittest.cc', |
| 52 'clipboard/custom_data_helper_unittest.cc', |
| 53 'cocoa/base_view_unittest.mm', |
| 54 'cocoa/cocoa_base_utils_unittest.mm', |
| 55 'cocoa/controls/blue_label_button_unittest.mm', |
| 56 'cocoa/controls/hover_image_menu_button_unittest.mm', |
| 57 'cocoa/controls/hyperlink_button_cell_unittest.mm', |
| 58 'cocoa/controls/hyperlink_text_view_unittest.mm', |
| 59 'cocoa/focus_tracker_unittest.mm', |
| 60 'cocoa/fullscreen_window_manager_unittest.mm', |
| 61 'cocoa/hover_image_button_unittest.mm', |
| 62 'cocoa/menu_controller_unittest.mm', |
| 63 'cocoa/nsgraphics_context_additions_unittest.mm', |
| 64 'cocoa/nsview_additions_unittest.mm', |
| 65 'cocoa/tracking_area_unittest.mm', |
| 66 'dragdrop/os_exchange_data_provider_aurax11_unittest.cc', |
| 67 'ime/candidate_window_unittest.cc', |
| 68 'ime/chromeos/character_composer_unittest.cc', |
| 69 'ime/composition_text_util_pango_unittest.cc', |
| 70 'ime/input_method_base_unittest.cc', |
| 71 'ime/input_method_chromeos_unittest.cc', |
| 72 'ime/remote_input_method_win_unittest.cc', |
| 73 'ime/win/imm32_manager_unittest.cc', |
| 74 'ime/win/tsf_input_scope_unittest.cc', |
| 75 'models/list_model_unittest.cc', |
| 76 'models/list_selection_model_unittest.cc', |
| 77 'models/tree_node_model_unittest.cc', |
| 78 'test/test_clipboard_unittest.cc', |
| 79 'test/data/resource.h', |
| 80 'text/bytes_formatting_unittest.cc', |
| 81 'touch/touch_editing_controller_unittest.cc', |
| 82 'view_prop_unittest.cc', |
| 83 'webui/web_ui_util_unittest.cc', |
| 84 'x/selection_requestor_unittest.cc', |
| 85 ], |
| 86 'include_dirs': [ |
| 87 '../..', |
| 88 ], |
| 89 'conditions': [ |
| 90 ['OS!="ios"', { |
| 91 'sources' : [ '<@(_all_sources)' ], |
| 92 }, { # OS=="ios" |
| 93 'sources' : [ '<@(_common_sources)' ], |
| 94 # The ResourceBundle unittest expects a locale.pak file to exist in |
| 95 # the bundle for English-US. Copy it in from where it was generated |
| 96 # by ui_resources.gyp:ui_test_pak. |
| 97 'mac_bundle_resources': [ |
| 98 '<(PRODUCT_DIR)/ui/en.lproj/locale.pak', |
| 99 ], |
| 100 'actions': [ |
| 101 { |
| 102 'action_name': 'copy_test_data', |
| 103 'variables': { |
| 104 'test_data_files': [ |
| 105 'test/data', |
| 106 ], |
| 107 'test_data_prefix' : 'ui/base', |
| 108 }, |
| 109 'includes': [ '../../build/copy_test_data_ios.gypi' ], |
| 110 }, |
| 111 ], |
| 112 }], |
| 113 ['OS == "win"', { |
| 114 'sources': [ |
| 115 'dragdrop/os_exchange_data_win_unittest.cc', |
| 116 'win/hwnd_subclass_unittest.cc', |
| 117 'win/open_file_name_win_unittest.cc', |
| 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 'sources!': [ |
| 145 'touch/touch_editing_controller_unittest.cc', |
| 146 ], |
| 147 }], |
| 148 ['use_pango == 1', { |
| 149 'dependencies': [ |
| 150 '../../build/linux/system.gyp:pangocairo', |
| 151 ], |
| 152 'conditions': [ |
| 153 ['use_allocator!="none"', { |
| 154 'dependencies': [ |
| 155 '../../base/allocator/allocator.gyp:allocator', |
| 156 ], |
| 157 }], |
| 158 ], |
| 159 }], |
| 160 ['use_x11==1', { |
| 161 'dependencies': [ |
| 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', |
| 166 ], |
| 167 }], |
| 168 ['OS!="win" or use_aura==0', { |
| 169 'sources!': [ |
| 170 'view_prop_unittest.cc', |
| 171 ], |
| 172 }], |
| 173 ['use_x11==1 and use_aura==1', { |
| 174 'sources': [ |
| 175 'cursor/cursor_loader_x11_unittest.cc', |
| 176 ], |
| 177 }], |
| 178 ['OS=="mac"', { |
| 179 'dependencies': [ |
| 180 '../../third_party/mozilla/mozilla.gyp:mozilla', |
| 181 '../events/events.gyp:events_test_support', |
| 182 'ui_base_tests_bundle', |
| 183 ], |
| 184 'conditions': [ |
| 185 ['component=="static_library"', { |
| 186 # Needed for mozilla.gyp. |
| 187 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, |
| 188 }], |
| 189 ], |
| 190 }], |
| 191 ['use_aura==1 or toolkit_views==1', { |
| 192 'sources': [ |
| 193 'dragdrop/os_exchange_data_unittest.cc', |
| 194 ], |
| 195 'dependencies': [ |
| 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', |
| 200 ], |
| 201 }], |
| 202 ['chromeos==1', { |
| 203 'dependencies': [ |
| 204 '../../chromeos/chromeos.gyp:chromeos', |
| 205 ], |
| 206 'sources!': [ |
| 207 'dragdrop/os_exchange_data_provider_aurax11_unittest.cc', |
| 208 'x/selection_requestor_unittest.cc', |
| 209 ], |
| 210 }], |
| 211 ['use_x11==0', { |
| 212 'sources!': [ |
| 213 'ime/chromeos/character_composer_unittest.cc', |
| 214 'ime/input_method_chromeos_unittest.cc', |
| 215 'ime/composition_text_util_pango_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', '^l10n/l10n_util_mac_unittest\\.mm$'], |
| 225 ], |
| 226 }], |
| 227 ], |
24 }, | 228 }, |
25 ], | 229 ], |
26 'conditions': [ | 230 'conditions': [ |
27 # Mac target to build a test Framework bundle to mock out resource loading. | 231 # Mac target to build a test Framework bundle to mock out resource loading. |
28 ['OS == "mac"', { | 232 ['OS == "mac"', { |
29 'targets': [ | 233 'targets': [ |
30 { | 234 { |
31 'target_name': 'ui_base_tests_bundle', | 235 'target_name': 'ui_base_tests_bundle', |
32 'type': 'shared_library', | 236 'type': 'shared_library', |
33 'dependencies': [ | 237 'dependencies': [ |
(...skipping 10 matching lines...) Expand all Loading... |
44 '../../build/sanitizers/sanitizers.gyp:sanitizer_options', | 248 '../../build/sanitizers/sanitizers.gyp:sanitizer_options', |
45 ], | 249 ], |
46 }], | 250 }], |
47 ], | 251 ], |
48 }, | 252 }, |
49 ], | 253 ], |
50 }], | 254 }], |
51 ['OS == "android"', { | 255 ['OS == "android"', { |
52 'targets': [ | 256 'targets': [ |
53 { | 257 { |
54 # TODO(tfarina): Remove this target after all traces of it are updated | |
55 # to point to ui_base_unittests_apk. crbug.com/331829 | |
56 'target_name': 'ui_unittests_apk', | |
57 'type': 'none', | |
58 'dependencies': [ | |
59 # TODO(tfarina): This is a layer violation and should be removed. | |
60 # crbug.com/176960 | |
61 # For now this is here as a temporary band-aid to fix the clobber | |
62 # issue we are seeing when running this target on Android. | |
63 # crbug.com/374490 | |
64 '../../chrome/chrome_resources.gyp:packed_resources', | |
65 'ui_unittests', | |
66 ], | |
67 'variables': { | |
68 'test_suite_name': 'ui_unittests', | |
69 }, | |
70 'includes': [ '../../build/apk_test.gypi' ], | |
71 }, | |
72 { | |
73 'target_name': 'ui_base_unittests_apk', | 258 'target_name': 'ui_base_unittests_apk', |
74 'type': 'none', | 259 'type': 'none', |
75 'dependencies': [ | 260 'dependencies': [ |
76 # TODO(tfarina): This is a layer violation and should be removed. | 261 # TODO(tfarina): This is a layer violation and should be removed. |
77 # crbug.com/176960 | 262 # crbug.com/176960 |
78 # For now this is here as a temporary band-aid to fix the clobber | 263 # For now this is here as a temporary band-aid to fix the clobber |
79 # issue we are seeing when running this target on Android. | 264 # issue we are seeing when running this target on Android. |
80 # crbug.com/374490 | 265 # crbug.com/374490 |
81 '../../chrome/chrome_resources.gyp:packed_resources', | 266 '../../chrome/chrome_resources.gyp:packed_resources', |
82 'ui_base_unittests', | 267 'ui_base_unittests', |
83 ], | 268 ], |
84 'variables': { | 269 'variables': { |
85 'test_suite_name': 'ui_base_unittests', | 270 'test_suite_name': 'ui_base_unittests', |
86 }, | 271 }, |
87 'includes': [ '../../build/apk_test.gypi' ], | 272 'includes': [ '../../build/apk_test.gypi' ], |
88 }, | 273 }, |
89 ], | 274 ], |
90 }], | 275 }], |
91 ], | 276 ], |
92 } | 277 } |
OLD | NEW |