| OLD | NEW |
| (Empty) |
| 1 # Copyright (c) 2012 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. | |
| 4 | |
| 5 { | |
| 6 'targets': [ | |
| 7 { | |
| 8 'target_name': 'ui_test_support', | |
| 9 'dependencies': [ | |
| 10 '../base/base.gyp:base', | |
| 11 '../skia/skia.gyp:skia', | |
| 12 '../testing/gtest.gyp:gtest', | |
| 13 'events/events.gyp:events', | |
| 14 'gfx/gfx.gyp:gfx', | |
| 15 ], | |
| 16 'sources': [ | |
| 17 'base/test/cocoa_test_event_utils.h', | |
| 18 'base/test/cocoa_test_event_utils.mm', | |
| 19 'base/test/ui_cocoa_test_helper.h', | |
| 20 'base/test/ui_cocoa_test_helper.mm', | |
| 21 'base/test/ui_controls.h', | |
| 22 'base/test/ui_controls_aura.cc', | |
| 23 'base/test/ui_controls_gtk.cc', | |
| 24 'base/test/ui_controls_internal_win.cc', | |
| 25 'base/test/ui_controls_internal_win.h', | |
| 26 'base/test/ui_controls_mac.mm', | |
| 27 'base/test/ui_controls_win.cc', | |
| 28 'gfx/test/color_util.cc', | |
| 29 'gfx/test/color_util.h', | |
| 30 ], | |
| 31 'include_dirs': [ | |
| 32 '../', | |
| 33 ], | |
| 34 'conditions': [ | |
| 35 ['OS!="ios"', { | |
| 36 'type': 'static_library', | |
| 37 'includes': [ 'base/ime/ime_test_support.gypi' ], | |
| 38 }, { # OS=="ios" | |
| 39 # None of the sources in this target are built on iOS, resulting in | |
| 40 # link errors when building targets that depend on this target | |
| 41 # because the static library isn't found. If this target is changed | |
| 42 # to have sources that are built on iOS, the target should be changed | |
| 43 # to be of type static_library on all platforms. | |
| 44 'type': 'none', | |
| 45 # The cocoa files don't apply to iOS. | |
| 46 'sources/': [['exclude', 'cocoa']], | |
| 47 }], | |
| 48 ['chromeos==1', { | |
| 49 'dependencies': [ | |
| 50 '../chromeos/chromeos.gyp:chromeos_test_support_without_gmock', | |
| 51 '../skia/skia.gyp:skia', | |
| 52 ], | |
| 53 }], | |
| 54 ['use_aura==1', { | |
| 55 'sources!': [ | |
| 56 'base/test/ui_controls_win.cc', | |
| 57 ], | |
| 58 }], | |
| 59 ], | |
| 60 }, | |
| 61 { | |
| 62 'target_name': 'run_ui_unittests', | |
| 63 'type': 'static_library', | |
| 64 'dependencies': [ | |
| 65 '../base/base.gyp:base', | |
| 66 '../base/base.gyp:test_support_base', | |
| 67 'ui', | |
| 68 ], | |
| 69 'sources': [ | |
| 70 'test/test_suite.cc', | |
| 71 'test/test_suite.h', | |
| 72 'test/run_all_unittests.cc', | |
| 73 ], | |
| 74 }, | |
| 75 { | |
| 76 'target_name': 'ui_unittests', | |
| 77 'type': '<(gtest_target_type)', | |
| 78 'dependencies': [ | |
| 79 '../base/base.gyp:base', | |
| 80 '../base/base.gyp:test_support_base', | |
| 81 '../skia/skia.gyp:skia', | |
| 82 '../testing/gmock.gyp:gmock', | |
| 83 '../testing/gtest.gyp:gtest', | |
| 84 '../third_party/icu/icu.gyp:icui18n', | |
| 85 '../third_party/icu/icu.gyp:icuuc', | |
| 86 '../third_party/libpng/libpng.gyp:libpng', | |
| 87 '../url/url.gyp:url_lib', | |
| 88 'base/strings/ui_strings.gyp:ui_strings', | |
| 89 'events/events.gyp:events', | |
| 90 'keycode_converter', | |
| 91 'run_ui_unittests', | |
| 92 'shell_dialogs', | |
| 93 'ui', | |
| 94 'ui_resources', | |
| 95 'ui_test_support', | |
| 96 ], | |
| 97 # iOS uses a small subset of ui. common_sources are the only files that | |
| 98 # are built on iOS. | |
| 99 'common_sources' : [ | |
| 100 'base/layout_unittest.cc', | |
| 101 'base/l10n/l10n_util_mac_unittest.mm', | |
| 102 'base/l10n/l10n_util_unittest.cc', | |
| 103 'base/l10n/l10n_util_win_unittest.cc', | |
| 104 'base/l10n/time_format_unittest.cc', | |
| 105 'base/models/tree_node_iterator_unittest.cc', | |
| 106 'base/resource/data_pack_literal.cc', | |
| 107 'base/resource/data_pack_unittest.cc', | |
| 108 'base/resource/resource_bundle_unittest.cc', | |
| 109 'gfx/animation/animation_container_unittest.cc', | |
| 110 'gfx/animation/animation_unittest.cc', | |
| 111 'gfx/animation/multi_animation_unittest.cc', | |
| 112 'gfx/animation/slide_animation_unittest.cc', | |
| 113 'gfx/box_unittest.cc', | |
| 114 'gfx/codec/png_codec_unittest.cc', | |
| 115 'gfx/color_utils_unittest.cc', | |
| 116 'gfx/display_unittest.cc', | |
| 117 'gfx/font_unittest.cc', | |
| 118 'gfx/image/image_family_unittest.cc', | |
| 119 'gfx/image/image_skia_unittest.cc', | |
| 120 'gfx/image/image_unittest.cc', | |
| 121 'gfx/image/image_unittest_util.cc', | |
| 122 'gfx/image/image_unittest_util.h', | |
| 123 'gfx/image/image_unittest_util_ios.mm', | |
| 124 'gfx/image/image_unittest_util_mac.mm', | |
| 125 'gfx/insets_unittest.cc', | |
| 126 'gfx/matrix3_unittest.cc', | |
| 127 'gfx/point_unittest.cc', | |
| 128 'gfx/point3_unittest.cc', | |
| 129 'gfx/quad_unittest.cc', | |
| 130 'gfx/range/range_mac_unittest.mm', | |
| 131 'gfx/range/range_unittest.cc', | |
| 132 'gfx/range/range_win_unittest.cc', | |
| 133 'gfx/rect_unittest.cc', | |
| 134 'gfx/safe_integer_conversions_unittest.cc', | |
| 135 'gfx/screen_unittest.cc', | |
| 136 'gfx/shadow_value_unittest.cc', | |
| 137 'gfx/size_unittest.cc', | |
| 138 'gfx/skbitmap_operations_unittest.cc', | |
| 139 'gfx/text_elider_unittest.cc', | |
| 140 'gfx/text_utils_unittest.cc', | |
| 141 'gfx/vector2d_unittest.cc', | |
| 142 'gfx/vector3d_unittest.cc', | |
| 143 ], | |
| 144 'all_sources': [ | |
| 145 '<@(_common_sources)', | |
| 146 'base/accelerators/accelerator_manager_unittest.cc', | |
| 147 'base/accelerators/menu_label_accelerator_util_linux_unittest.cc', | |
| 148 'base/clipboard/clipboard_unittest.cc', | |
| 149 'base/clipboard/custom_data_helper_unittest.cc', | |
| 150 'base/cocoa/base_view_unittest.mm', | |
| 151 'base/cocoa/cocoa_event_utils_unittest.mm', | |
| 152 'base/cocoa/controls/blue_label_button_unittest.mm', | |
| 153 'base/cocoa/controls/hover_image_menu_button_unittest.mm', | |
| 154 'base/cocoa/controls/hyperlink_button_cell_unittest.mm', | |
| 155 'base/cocoa/events_mac_unittest.mm', | |
| 156 'base/cocoa/focus_tracker_unittest.mm', | |
| 157 'base/cocoa/fullscreen_window_manager_unittest.mm', | |
| 158 'base/cocoa/hover_image_button_unittest.mm', | |
| 159 'base/cocoa/menu_controller_unittest.mm', | |
| 160 'base/cocoa/nsgraphics_context_additions_unittest.mm', | |
| 161 'base/cocoa/tracking_area_unittest.mm', | |
| 162 'base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc', | |
| 163 'base/gtk/gtk_expanded_container_unittest.cc', | |
| 164 'base/keycodes/keycode_converter_unittest.cc', | |
| 165 'base/models/list_model_unittest.cc', | |
| 166 'base/models/list_selection_model_unittest.cc', | |
| 167 'base/models/tree_node_model_unittest.cc', | |
| 168 'base/test/data/resource.h', | |
| 169 'base/text/bytes_formatting_unittest.cc', | |
| 170 'base/view_prop_unittest.cc', | |
| 171 'base/webui/web_ui_util_unittest.cc', | |
| 172 'events/event_dispatcher_unittest.cc', | |
| 173 'events/event_unittest.cc', | |
| 174 'events/latency_info_unittest.cc', | |
| 175 'events/ozone/evdev/key_event_converter_unittest.cc', | |
| 176 'events/ozone/evdev/touch_event_converter_unittest.cc', | |
| 177 'gfx/animation/tween_unittest.cc', | |
| 178 'gfx/blit_unittest.cc', | |
| 179 'gfx/break_list_unittest.cc', | |
| 180 'gfx/canvas_unittest.cc', | |
| 181 'gfx/canvas_unittest_mac.mm', | |
| 182 'gfx/codec/jpeg_codec_unittest.cc', | |
| 183 'gfx/color_analysis_unittest.cc', | |
| 184 'gfx/font_list_unittest.cc', | |
| 185 'gfx/image/image_mac_unittest.mm', | |
| 186 'gfx/image/image_util_unittest.cc', | |
| 187 'gfx/ozone/impl/hardware_display_controller_ozone_unittest.cc', | |
| 188 'gfx/ozone/impl/software_surface_factory_ozone_unittest.cc', | |
| 189 'gfx/ozone/impl/software_surface_ozone_unittest.cc', | |
| 190 'gfx/platform_font_mac_unittest.mm', | |
| 191 'gfx/render_text_unittest.cc', | |
| 192 'gfx/sequential_id_generator_unittest.cc', | |
| 193 'gfx/transform_util_unittest.cc', | |
| 194 'gfx/utf16_indexing_unittest.cc', | |
| 195 'shell_dialogs/select_file_dialog_win_unittest.cc', | |
| 196 ], | |
| 197 'include_dirs': [ | |
| 198 '../', | |
| 199 ], | |
| 200 'conditions': [ | |
| 201 ['OS!="ios"', { | |
| 202 'sources' : ['<@(_all_sources)'], | |
| 203 'includes': [ | |
| 204 'base/ime/ime_unittests.gypi', | |
| 205 ], | |
| 206 }, { # OS=="ios" | |
| 207 'sources' : [ | |
| 208 '<@(_common_sources)', | |
| 209 ], | |
| 210 # The ResourceBundle unittest expects a locale.pak file to exist in | |
| 211 # the bundle for English-US. Copy it in from where it was generated | |
| 212 # by ui_strings.gyp:ui_unittest_strings. | |
| 213 'mac_bundle_resources': [ | |
| 214 '<(PRODUCT_DIR)/ui_unittests_strings/en.lproj/locale.pak', | |
| 215 ], | |
| 216 }], | |
| 217 ['OS == "win"', { | |
| 218 'sources': [ | |
| 219 'test/ui_unittests.rc', | |
| 220 'base/dragdrop/os_exchange_data_win_unittest.cc', | |
| 221 'base/win/hwnd_subclass_unittest.cc', | |
| 222 'gfx/font_fallback_win_unittest.cc', | |
| 223 'gfx/icon_util_unittest.cc', | |
| 224 'gfx/platform_font_win_unittest.cc', | |
| 225 ], | |
| 226 'include_dirs': [ | |
| 227 '../..', | |
| 228 '../third_party/wtl/include', | |
| 229 ], | |
| 230 'msvs_settings': { | |
| 231 'VCLinkerTool': { | |
| 232 'DelayLoadDLLs': [ | |
| 233 'd2d1.dll', | |
| 234 'd3d10_1.dll', | |
| 235 ], | |
| 236 'AdditionalDependencies': [ | |
| 237 'd2d1.lib', | |
| 238 'd3d10_1.lib', | |
| 239 ], | |
| 240 }, | |
| 241 }, | |
| 242 'link_settings': { | |
| 243 'libraries': [ | |
| 244 '-limm32.lib', | |
| 245 '-loleacc.lib', | |
| 246 ], | |
| 247 }, | |
| 248 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | |
| 249 'msvs_disabled_warnings': [ 4267, ], | |
| 250 }], | |
| 251 ['OS == "linux" and toolkit_views==1', { | |
| 252 'sources': [ | |
| 253 'events/x/events_x_unittest.cc', | |
| 254 ], | |
| 255 }], | |
| 256 ['OS != "mac" and OS != "ios"', { | |
| 257 'sources': [ | |
| 258 'gfx/transform_unittest.cc', | |
| 259 'gfx/interpolated_transform_unittest.cc', | |
| 260 ], | |
| 261 }], | |
| 262 ['OS == "android" and gtest_target_type == "shared_library"', { | |
| 263 'dependencies': [ | |
| 264 '../testing/android/native_test.gyp:native_test_native_code', | |
| 265 ], | |
| 266 }], | |
| 267 ['use_glib == 1 or OS == "ios"', { | |
| 268 'dependencies': [ | |
| 269 'base/strings/ui_strings.gyp:ui_unittest_strings', | |
| 270 ], | |
| 271 }], | |
| 272 ['use_pango == 1', { | |
| 273 'dependencies': [ | |
| 274 '../build/linux/system.gyp:fontconfig', | |
| 275 '../build/linux/system.gyp:pangocairo', | |
| 276 ], | |
| 277 'sources': [ | |
| 278 'gfx/platform_font_pango_unittest.cc', | |
| 279 ], | |
| 280 'conditions': [ | |
| 281 ['linux_use_tcmalloc==1', { | |
| 282 'dependencies': [ | |
| 283 '../base/allocator/allocator.gyp:allocator', | |
| 284 ], | |
| 285 }], | |
| 286 ['toolkit_views==1', { | |
| 287 'sources!': [ | |
| 288 'browser/ui/gtk/gtk_expanded_container_unittest.cc', | |
| 289 ], | |
| 290 }], | |
| 291 ], | |
| 292 }], | |
| 293 ['use_x11==1', { | |
| 294 'dependencies': [ | |
| 295 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', | |
| 296 ], | |
| 297 }], | |
| 298 ['toolkit_uses_gtk == 1', { | |
| 299 'sources': [ | |
| 300 'base/dragdrop/gtk_dnd_util_unittest.cc', | |
| 301 ], | |
| 302 'dependencies': [ | |
| 303 '../build/linux/system.gyp:gtk', | |
| 304 ], | |
| 305 }], | |
| 306 ['OS=="android" or OS=="ios"', { | |
| 307 'sources!': [ | |
| 308 'gfx/render_text_unittest.cc', | |
| 309 ], | |
| 310 }], | |
| 311 ['OS!="win" or use_aura==0', { | |
| 312 'sources!': [ | |
| 313 'base/view_prop_unittest.cc', | |
| 314 ], | |
| 315 }], | |
| 316 ['use_x11==1 and use_aura==1', { | |
| 317 'sources': [ | |
| 318 'base/cursor/cursor_loader_x11_unittest.cc', | |
| 319 ], | |
| 320 }], | |
| 321 ['use_aura==1 or toolkit_views==1', { | |
| 322 'sources': [ | |
| 323 'base/dragdrop/os_exchange_data_unittest.cc', | |
| 324 'events/gestures/velocity_calculator_unittest.cc', | |
| 325 ], | |
| 326 }, { | |
| 327 'sources!': [ | |
| 328 'events/event_dispatcher_unittest.cc', | |
| 329 'events/event_unittest.cc', | |
| 330 ], | |
| 331 }], | |
| 332 ['use_aura==1', { | |
| 333 'sources!': [ | |
| 334 'base/dialogs/select_file_dialog_win_unittest.cc', | |
| 335 'base/dragdrop/os_exchange_data_win_unittest.cc', | |
| 336 'gfx/screen_unittest.cc', | |
| 337 ], | |
| 338 }], | |
| 339 ['use_ozone==1', { | |
| 340 'dependencies': [ | |
| 341 '<(DEPTH)/build/linux/system.gyp:dridrm', | |
| 342 ], | |
| 343 }], | |
| 344 ['chromeos==1', { | |
| 345 'sources!': [ | |
| 346 'base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc', | |
| 347 ], | |
| 348 }], | |
| 349 ], | |
| 350 'target_conditions': [ | |
| 351 ['OS == "ios"', { | |
| 352 'sources/': [ | |
| 353 # Pull in specific Mac files for iOS (which have been filtered out | |
| 354 # by file name rules). | |
| 355 ['include', '^base/l10n/l10n_util_mac_unittest\\.mm$'], | |
| 356 ], | |
| 357 }], | |
| 358 ], | |
| 359 }, | |
| 360 ], | |
| 361 'conditions': [ | |
| 362 # Special target to wrap a gtest_target_type==shared_library | |
| 363 # ui_unittests into an android apk for execution. | |
| 364 # See base.gyp for TODO(jrg)s about this strategy. | |
| 365 ['OS == "android" and gtest_target_type == "shared_library"', { | |
| 366 'targets': [ | |
| 367 { | |
| 368 'target_name': 'ui_unittests_apk', | |
| 369 'type': 'none', | |
| 370 'dependencies': [ | |
| 371 'ui_unittests', | |
| 372 ], | |
| 373 'variables': { | |
| 374 'test_suite_name': 'ui_unittests', | |
| 375 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)ui_unitte
sts<(SHARED_LIB_SUFFIX)', | |
| 376 }, | |
| 377 'includes': [ '../build/apk_test.gypi' ], | |
| 378 }, | |
| 379 ], | |
| 380 }], | |
| 381 ], | |
| 382 } | |
| OLD | NEW |