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): Rename this target to ui_base_unittests. | 11 # TODO(tfarina): Remove this target after all traces of it are updated to |
12 # In order to do this we will need to keep this target, add a dummy | 12 # point to ui_base_unittests. That means updating buildbot code and some |
13 # ui_base_unittests target that just points to ui_unittests, change | 13 # references in chromium too. crbug.com/331829 |
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 # GN version: //ui/base:unittests | 14 # GN version: //ui/base:unittests |
18 'target_name': 'ui_unittests', | 15 'target_name': 'ui_unittests', |
19 'type': '<(gtest_target_type)', | 16 'type': '<(gtest_target_type)', |
20 'dependencies': [ | 17 'dependencies': [ |
21 '../../base/base.gyp:base', | 18 '../../base/base.gyp:base', |
22 '../../base/base.gyp:test_support_base', | 19 '../../base/base.gyp:test_support_base', |
23 '../../net/net.gyp:net', | 20 '../../net/net.gyp:net', |
24 '../../skia/skia.gyp:skia', | 21 '../../skia/skia.gyp:skia', |
25 '../../testing/gmock.gyp:gmock', | 22 '../../testing/gmock.gyp:gmock', |
26 '../../testing/gtest.gyp:gtest', | 23 '../../testing/gtest.gyp:gtest', |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 'target_conditions': [ | 223 'target_conditions': [ |
227 ['OS == "ios"', { | 224 ['OS == "ios"', { |
228 'sources/': [ | 225 'sources/': [ |
229 # Pull in specific Mac files for iOS (which have been filtered out | 226 # Pull in specific Mac files for iOS (which have been filtered out |
230 # by file name rules). | 227 # by file name rules). |
231 ['include', '^l10n/l10n_util_mac_unittest\\.mm$'], | 228 ['include', '^l10n/l10n_util_mac_unittest\\.mm$'], |
232 ], | 229 ], |
233 }], | 230 }], |
234 ], | 231 ], |
235 }, | 232 }, |
| 233 { |
| 234 # GN version: //ui/base:unittests |
| 235 'target_name': 'ui_base_unittests', |
| 236 'type': '<(gtest_target_type)', |
| 237 'dependencies': [ |
| 238 '../../base/base.gyp:base', |
| 239 '../../base/base.gyp:test_support_base', |
| 240 '../../net/net.gyp:net', |
| 241 '../../skia/skia.gyp:skia', |
| 242 '../../testing/gmock.gyp:gmock', |
| 243 '../../testing/gtest.gyp:gtest', |
| 244 '../../third_party/icu/icu.gyp:icui18n', |
| 245 '../../third_party/icu/icu.gyp:icuuc', |
| 246 '../../url/url.gyp:url_lib', |
| 247 '../events/events.gyp:events_base', |
| 248 '../gfx/gfx.gyp:gfx_test_support', |
| 249 '../resources/ui_resources.gyp:ui_resources', |
| 250 '../resources/ui_resources.gyp:ui_test_pak', |
| 251 '../strings/ui_strings.gyp:ui_strings', |
| 252 'ui_base.gyp:ui_base', |
| 253 'ui_base.gyp:ui_base_test_support', |
| 254 ], |
| 255 # iOS uses a small subset of ui. common_sources are the only files that |
| 256 # are built on iOS. |
| 257 'common_sources' : [ |
| 258 # Note: file list duplicated in GN build. |
| 259 'layout_unittest.cc', |
| 260 'l10n/l10n_util_mac_unittest.mm', |
| 261 'l10n/l10n_util_unittest.cc', |
| 262 'l10n/l10n_util_win_unittest.cc', |
| 263 'l10n/time_format_unittest.cc', |
| 264 'models/tree_node_iterator_unittest.cc', |
| 265 'resource/data_pack_literal.cc', |
| 266 'resource/data_pack_unittest.cc', |
| 267 'resource/resource_bundle_unittest.cc', |
| 268 'test/run_all_unittests.cc', |
| 269 ], |
| 270 'all_sources': [ |
| 271 # Note: file list duplicated in GN build. |
| 272 '<@(_common_sources)', |
| 273 'accelerators/accelerator_manager_unittest.cc', |
| 274 'accelerators/menu_label_accelerator_util_linux_unittest.cc', |
| 275 'clipboard/custom_data_helper_unittest.cc', |
| 276 'cocoa/base_view_unittest.mm', |
| 277 'cocoa/cocoa_base_utils_unittest.mm', |
| 278 'cocoa/controls/blue_label_button_unittest.mm', |
| 279 'cocoa/controls/hover_image_menu_button_unittest.mm', |
| 280 'cocoa/controls/hyperlink_button_cell_unittest.mm', |
| 281 'cocoa/focus_tracker_unittest.mm', |
| 282 'cocoa/fullscreen_window_manager_unittest.mm', |
| 283 'cocoa/hover_image_button_unittest.mm', |
| 284 'cocoa/menu_controller_unittest.mm', |
| 285 'cocoa/nsgraphics_context_additions_unittest.mm', |
| 286 'cocoa/tracking_area_unittest.mm', |
| 287 'dragdrop/os_exchange_data_provider_aurax11_unittest.cc', |
| 288 'ime/candidate_window_unittest.cc', |
| 289 'ime/chromeos/character_composer_unittest.cc', |
| 290 'ime/composition_text_util_pango_unittest.cc', |
| 291 'ime/input_method_base_unittest.cc', |
| 292 'ime/input_method_chromeos_unittest.cc', |
| 293 'ime/remote_input_method_win_unittest.cc', |
| 294 'ime/win/imm32_manager_unittest.cc', |
| 295 'ime/win/tsf_input_scope_unittest.cc', |
| 296 'models/list_model_unittest.cc', |
| 297 'models/list_selection_model_unittest.cc', |
| 298 'models/tree_node_model_unittest.cc', |
| 299 'test/data/resource.h', |
| 300 'text/bytes_formatting_unittest.cc', |
| 301 'view_prop_unittest.cc', |
| 302 'webui/web_ui_util_unittest.cc', |
| 303 'x/selection_requestor_unittest.cc', |
| 304 ], |
| 305 'include_dirs': [ |
| 306 '../..', |
| 307 ], |
| 308 'conditions': [ |
| 309 ['OS!="ios"', { |
| 310 'sources' : ['<@(_all_sources)'], |
| 311 }, { # OS=="ios" |
| 312 'sources' : [ |
| 313 '<@(_common_sources)', |
| 314 ], |
| 315 # The ResourceBundle unittest expects a locale.pak file to exist in |
| 316 # the bundle for English-US. Copy it in from where it was generated |
| 317 # by ui_resources.gyp:ui_test_pak. |
| 318 'mac_bundle_resources': [ |
| 319 '<(PRODUCT_DIR)/ui/en.lproj/locale.pak', |
| 320 ], |
| 321 'actions': [ |
| 322 { |
| 323 'action_name': 'copy_test_data', |
| 324 'variables': { |
| 325 'test_data_files': [ |
| 326 'test/data', |
| 327 ], |
| 328 'test_data_prefix' : 'ui/base', |
| 329 }, |
| 330 'includes': [ '../../build/copy_test_data_ios.gypi' ], |
| 331 }, |
| 332 ], |
| 333 }], |
| 334 ['OS == "win"', { |
| 335 'sources': [ |
| 336 'dragdrop/os_exchange_data_win_unittest.cc', |
| 337 'win/hwnd_subclass_unittest.cc', |
| 338 'win/open_file_name_win_unittest.cc', |
| 339 ], |
| 340 'msvs_settings': { |
| 341 'VCLinkerTool': { |
| 342 'DelayLoadDLLs': [ |
| 343 'd2d1.dll', |
| 344 'd3d10_1.dll', |
| 345 ], |
| 346 'AdditionalDependencies': [ |
| 347 'd2d1.lib', |
| 348 'd3d10_1.lib', |
| 349 ], |
| 350 }, |
| 351 }, |
| 352 'link_settings': { |
| 353 'libraries': [ |
| 354 '-limm32.lib', |
| 355 '-loleacc.lib', |
| 356 ], |
| 357 }, |
| 358 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 359 'msvs_disabled_warnings': [ 4267, ], |
| 360 }], |
| 361 ['OS == "android"', { |
| 362 'dependencies': [ |
| 363 '../../testing/android/native_test.gyp:native_test_native_code', |
| 364 ], |
| 365 }], |
| 366 ['use_pango == 1', { |
| 367 'dependencies': [ |
| 368 '../../build/linux/system.gyp:pangocairo', |
| 369 ], |
| 370 'conditions': [ |
| 371 ['use_allocator!="none"', { |
| 372 'dependencies': [ |
| 373 '../../base/allocator/allocator.gyp:allocator', |
| 374 ], |
| 375 }], |
| 376 ], |
| 377 }], |
| 378 ['use_x11==1', { |
| 379 'dependencies': [ |
| 380 '../../build/linux/system.gyp:x11', |
| 381 '../../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', |
| 382 '../events/platform/x11/x11_events_platform.gyp:x11_events_platform'
, |
| 383 '../gfx/x/gfx_x11.gyp:gfx_x11', |
| 384 ], |
| 385 }], |
| 386 ['OS!="win" or use_aura==0', { |
| 387 'sources!': [ |
| 388 'view_prop_unittest.cc', |
| 389 ], |
| 390 }], |
| 391 ['use_x11==1 and use_aura==1', { |
| 392 'sources': [ |
| 393 'cursor/cursor_loader_x11_unittest.cc', |
| 394 ], |
| 395 }], |
| 396 ['OS=="mac"', { |
| 397 'dependencies': [ |
| 398 '../../third_party/mozilla/mozilla.gyp:mozilla', |
| 399 '../events/events.gyp:events_test_support', |
| 400 'ui_base_tests_bundle', |
| 401 ], |
| 402 'conditions': [ |
| 403 ['component=="static_library"', { |
| 404 # Needed for mozilla.gyp. |
| 405 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, |
| 406 }], |
| 407 ], |
| 408 }], |
| 409 ['use_aura==1 or toolkit_views==1', { |
| 410 'sources': [ |
| 411 'dragdrop/os_exchange_data_unittest.cc', |
| 412 ], |
| 413 'dependencies': [ |
| 414 '../events/events.gyp:events', |
| 415 '../events/events.gyp:events_base', |
| 416 '../events/events.gyp:events_test_support', |
| 417 '../events/platform/events_platform.gyp:events_platform', |
| 418 ], |
| 419 }], |
| 420 ['chromeos==1', { |
| 421 'dependencies': [ |
| 422 '../../chromeos/chromeos.gyp:chromeos', |
| 423 '../aura/aura.gyp:aura_test_support', |
| 424 '../chromeos/ui_chromeos.gyp:ui_chromeos', |
| 425 '../events/events.gyp:gesture_detection', |
| 426 ], |
| 427 'sources': [ |
| 428 '../chromeos/touch_exploration_controller_unittest.cc' |
| 429 ], |
| 430 'sources!': [ |
| 431 'dragdrop/os_exchange_data_provider_aurax11_unittest.cc', |
| 432 'x/selection_requestor_unittest.cc', |
| 433 ], |
| 434 }], |
| 435 ['use_x11==0', { |
| 436 'sources!': [ |
| 437 'ime/chromeos/character_composer_unittest.cc', |
| 438 'ime/input_method_chromeos_unittest.cc', |
| 439 'ime/composition_text_util_pango_unittest.cc', |
| 440 ], |
| 441 }], |
| 442 ], |
| 443 'target_conditions': [ |
| 444 ['OS == "ios"', { |
| 445 'sources/': [ |
| 446 # Pull in specific Mac files for iOS (which have been filtered out |
| 447 # by file name rules). |
| 448 ['include', '^l10n/l10n_util_mac_unittest\\.mm$'], |
| 449 ], |
| 450 }], |
| 451 ], |
| 452 }, |
236 ], | 453 ], |
237 'conditions': [ | 454 'conditions': [ |
238 # Mac target to build a test Framework bundle to mock out resource loading. | 455 # Mac target to build a test Framework bundle to mock out resource loading. |
239 ['OS == "mac"', { | 456 ['OS == "mac"', { |
240 'targets': [ | 457 'targets': [ |
241 { | 458 { |
242 'target_name': 'ui_base_tests_bundle', | 459 'target_name': 'ui_base_tests_bundle', |
243 'type': 'shared_library', | 460 'type': 'shared_library', |
244 'dependencies': [ | 461 'dependencies': [ |
245 '../resources/ui_resources.gyp:ui_test_pak', | 462 '../resources/ui_resources.gyp:ui_test_pak', |
246 ], | 463 ], |
247 'includes': [ 'ui_base_tests_bundle.gypi' ], | 464 'includes': [ 'ui_base_tests_bundle.gypi' ], |
248 }, | 465 }, |
249 ], | 466 ], |
250 }], | 467 }], |
251 ['OS == "android"', { | 468 ['OS == "android"', { |
252 'targets': [ | 469 'targets': [ |
253 { | 470 { |
254 'target_name': 'ui_unittests_apk', | 471 'target_name': 'ui_unittests_apk', |
255 'type': 'none', | 472 'type': 'none', |
256 'dependencies': [ | 473 'dependencies': [ |
257 'ui_unittests', | 474 'ui_unittests', |
258 ], | 475 ], |
259 'variables': { | 476 'variables': { |
260 'test_suite_name': 'ui_unittests', | 477 'test_suite_name': 'ui_unittests', |
261 }, | 478 }, |
262 'includes': [ '../../build/apk_test.gypi' ], | 479 'includes': [ '../../build/apk_test.gypi' ], |
263 }, | 480 }, |
| 481 { |
| 482 'target_name': 'ui_base_unittests_apk', |
| 483 'type': 'none', |
| 484 'dependencies': [ |
| 485 'ui_base_unittests', |
| 486 ], |
| 487 'variables': { |
| 488 'test_suite_name': 'ui_base_unittests', |
| 489 }, |
| 490 'includes': [ '../../build/apk_test.gypi' ], |
| 491 }, |
264 ], | 492 ], |
265 }], | 493 }], |
266 ], | 494 ], |
267 } | 495 } |
OLD | NEW |