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. 4 5{ 6 'type': '<(gtest_target_type)', 7 'dependencies': [ 8 '../../base/base.gyp:base', 9 '../../base/base.gyp:test_support_base', 10 '../../net/net.gyp:net', 11 '../../skia/skia.gyp:skia', 12 '../../testing/gmock.gyp:gmock', 13 '../../testing/gtest.gyp:gtest', 14 '../../third_party/icu/icu.gyp:icui18n', 15 '../../third_party/icu/icu.gyp:icuuc', 16 '../../url/url.gyp:url_lib', 17 '../events/events.gyp:events_base', 18 '../gfx/gfx.gyp:gfx_test_support', 19 '../resources/ui_resources.gyp:ui_resources', 20 '../resources/ui_resources.gyp:ui_test_pak', 21 '../strings/ui_strings.gyp:ui_strings', 22 'ui_base.gyp:ui_base', 23 'ui_base.gyp:ui_base_test_support', 24 ], 25 # iOS uses a small subset of ui. common_sources are the only files that 26 # are built on iOS. 27 'common_sources' : [ 28 # Note: file list duplicated in GN build. 29 'layout_unittest.cc', 30 'l10n/l10n_util_mac_unittest.mm', 31 'l10n/l10n_util_unittest.cc', 32 'l10n/l10n_util_win_unittest.cc', 33 'l10n/time_format_unittest.cc', 34 'models/tree_node_iterator_unittest.cc', 35 'resource/data_pack_literal.cc', 36 'resource/data_pack_unittest.cc', 37 'resource/resource_bundle_unittest.cc', 38 'test/run_all_unittests.cc', 39 ], 40 'all_sources': [ 41 # Note: file list duplicated in GN build. 42 '<@(_common_sources)', 43 'accelerators/accelerator_manager_unittest.cc', 44 'accelerators/menu_label_accelerator_util_linux_unittest.cc', 45 'clipboard/custom_data_helper_unittest.cc', 46 'cocoa/base_view_unittest.mm', 47 'cocoa/cocoa_base_utils_unittest.mm', 48 'cocoa/controls/blue_label_button_unittest.mm', 49 'cocoa/controls/hover_image_menu_button_unittest.mm', 50 'cocoa/controls/hyperlink_button_cell_unittest.mm', 51 'cocoa/controls/hyperlink_text_view_unittest.mm', 52 'cocoa/focus_tracker_unittest.mm', 53 'cocoa/fullscreen_window_manager_unittest.mm', 54 'cocoa/hover_image_button_unittest.mm', 55 'cocoa/menu_controller_unittest.mm', 56 'cocoa/nsgraphics_context_additions_unittest.mm', 57 'cocoa/nsview_additions_unittest.mm', 58 'cocoa/tracking_area_unittest.mm', 59 'dragdrop/os_exchange_data_provider_aurax11_unittest.cc', 60 'ime/candidate_window_unittest.cc', 61 'ime/chromeos/character_composer_unittest.cc', 62 'ime/composition_text_util_pango_unittest.cc', 63 'ime/input_method_base_unittest.cc', 64 'ime/input_method_chromeos_unittest.cc', 65 'ime/remote_input_method_win_unittest.cc', 66 'ime/win/imm32_manager_unittest.cc', 67 'ime/win/tsf_input_scope_unittest.cc', 68 'models/list_model_unittest.cc', 69 'models/list_selection_model_unittest.cc', 70 'models/tree_node_model_unittest.cc', 71 'test/data/resource.h', 72 'text/bytes_formatting_unittest.cc', 73 'view_prop_unittest.cc', 74 'webui/web_ui_util_unittest.cc', 75 'x/selection_requestor_unittest.cc', 76 ], 77 'include_dirs': [ 78 '../..', 79 ], 80 'conditions': [ 81 ['OS!="ios"', { 82 'sources' : [ '<@(_all_sources)' ], 83 }, { # OS=="ios" 84 'sources' : [ '<@(_common_sources)' ], 85 # The ResourceBundle unittest expects a locale.pak file to exist in 86 # the bundle for English-US. Copy it in from where it was generated 87 # by ui_resources.gyp:ui_test_pak. 88 'mac_bundle_resources': [ 89 '<(PRODUCT_DIR)/ui/en.lproj/locale.pak', 90 ], 91 'actions': [ 92 { 93 'action_name': 'copy_test_data', 94 'variables': { 95 'test_data_files': [ 96 'test/data', 97 ], 98 'test_data_prefix' : 'ui/base', 99 }, 100 'includes': [ '../../build/copy_test_data_ios.gypi' ], 101 }, 102 ], 103 }], 104 ['OS == "win"', { 105 'sources': [ 106 'dragdrop/os_exchange_data_win_unittest.cc', 107 'win/hwnd_subclass_unittest.cc', 108 'win/open_file_name_win_unittest.cc', 109 ], 110 'msvs_settings': { 111 'VCLinkerTool': { 112 'DelayLoadDLLs': [ 113 'd2d1.dll', 114 'd3d10_1.dll', 115 ], 116 'AdditionalDependencies': [ 117 'd2d1.lib', 118 'd3d10_1.lib', 119 ], 120 }, 121 }, 122 'link_settings': { 123 'libraries': [ 124 '-limm32.lib', 125 '-loleacc.lib', 126 ], 127 }, 128 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 129 'msvs_disabled_warnings': [ 4267, ], 130 }], 131 ['OS == "android"', { 132 'dependencies': [ 133 '../../testing/android/native_test.gyp:native_test_native_code', 134 ], 135 }], 136 ['use_pango == 1', { 137 'dependencies': [ 138 '../../build/linux/system.gyp:pangocairo', 139 ], 140 'conditions': [ 141 ['use_allocator!="none"', { 142 'dependencies': [ 143 '../../base/allocator/allocator.gyp:allocator', 144 ], 145 }], 146 ], 147 }], 148 ['use_x11==1', { 149 'dependencies': [ 150 '../../build/linux/system.gyp:x11', 151 '../../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', 152 '../events/platform/x11/x11_events_platform.gyp:x11_events_platform', 153 '../gfx/x/gfx_x11.gyp:gfx_x11', 154 ], 155 }], 156 ['OS!="win" or use_aura==0', { 157 'sources!': [ 158 'view_prop_unittest.cc', 159 ], 160 }], 161 ['use_x11==1 and use_aura==1', { 162 'sources': [ 163 'cursor/cursor_loader_x11_unittest.cc', 164 ], 165 }], 166 ['OS=="mac"', { 167 'dependencies': [ 168 '../../third_party/mozilla/mozilla.gyp:mozilla', 169 '../events/events.gyp:events_test_support', 170 'ui_base_tests_bundle', 171 ], 172 'conditions': [ 173 ['component=="static_library"', { 174 # Needed for mozilla.gyp. 175 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, 176 }], 177 ], 178 }], 179 ['use_aura==1 or toolkit_views==1', { 180 'sources': [ 181 'dragdrop/os_exchange_data_unittest.cc', 182 ], 183 'dependencies': [ 184 '../events/events.gyp:events', 185 '../events/events.gyp:events_base', 186 '../events/events.gyp:events_test_support', 187 '../events/platform/events_platform.gyp:events_platform', 188 ], 189 }], 190 ['chromeos==1', { 191 'dependencies': [ 192 '../../chromeos/chromeos.gyp:chromeos', 193 '../aura/aura.gyp:aura_test_support', 194 '../chromeos/ui_chromeos.gyp:ui_chromeos', 195 '../events/events.gyp:gesture_detection', 196 ], 197 'sources': [ 198 '../chromeos/touch_exploration_controller_unittest.cc' 199 ], 200 'sources!': [ 201 'dragdrop/os_exchange_data_provider_aurax11_unittest.cc', 202 'x/selection_requestor_unittest.cc', 203 ], 204 }], 205 ['use_x11==0', { 206 'sources!': [ 207 'ime/chromeos/character_composer_unittest.cc', 208 'ime/input_method_chromeos_unittest.cc', 209 'ime/composition_text_util_pango_unittest.cc', 210 ], 211 }], 212 ], 213 'target_conditions': [ 214 ['OS == "ios"', { 215 'sources/': [ 216 # Pull in specific Mac files for iOS (which have been filtered out 217 # by file name rules). 218 ['include', '^l10n/l10n_util_mac_unittest\\.mm$'], 219 ], 220 }], 221 ], 222} 223