diff options
| author | tfarina <tfarina@chromium.org> | 2014-09-03 07:45:46 -0700 |
|---|---|---|
| committer | Commit bot <commit-bot@chromium.org> | 2014-09-03 14:47:45 +0000 |
| commit | 2148b92f9cc676bf2b64dc7e47ef65daac393031 (patch) | |
| tree | c7cc0f5bee26fff949cb16a090cd4ed6d3d0ad7a | |
| parent | 0895d8016aec431402c5fabad4e7927cdaf4807f (diff) | |
| download | chromium_src-2148b92f9cc676bf2b64dc7e47ef65daac393031.zip chromium_src-2148b92f9cc676bf2b64dc7e47ef65daac393031.tar.gz chromium_src-2148b92f9cc676bf2b64dc7e47ef65daac393031.tar.bz2 | |
Reland "ui: Move ui_unittests.gyp into ui/base."
Original description from commit 63e36e6bdaa65d1152dd62f9831128c752bc0408:
ui: Move ui_unittests.gyp into ui/base.
ui_unittests.gyp -> ui_base_tests.gyp (follow gfx_tests.gyp pattern).
ui_unittests_bundle.gypi -> ui/base/ui_base_tests_bundle.gypi
ui_unittests.isolate -> ui_base_tests.isolate
Add a TODO assigned to me to rename ui_unittests target to
ui_base_unittests when buildbot is updated.
It was reverted in commit 6297a2f1e441c46d6f8ca37a3798fe6fbdd6cc4c,
because a test from ui_unittests in ios_dbg_simulator started to
failing.
BUG=331829,373148,299841,103304
TEST=ui_unittests
R=sky@chromium.org,rohitrao@chromium.org
Review URL: https://codereview.chromium.org/518423002
Cr-Commit-Position: refs/heads/master@{#293134}
| -rw-r--r-- | build/all.gyp | 20 | ||||
| -rw-r--r-- | build/android/pylib/gtest/setup.py | 2 | ||||
| -rw-r--r-- | chrome/chrome.gyp | 2 | ||||
| -rw-r--r-- | ui/base/ui_base_tests.gyp | 266 | ||||
| -rw-r--r-- | ui/base/ui_base_tests.isolate (renamed from ui/ui_unittests.isolate) | 4 | ||||
| -rw-r--r-- | ui/base/ui_base_tests_bundle.gypi (renamed from ui/ui_unittests_bundle.gypi) | 6 | ||||
| -rw-r--r-- | ui/ui_unittests.gyp | 260 |
7 files changed, 283 insertions, 277 deletions
diff --git a/build/all.gyp b/build/all.gyp index 6bb6a86..d7fe596 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -39,8 +39,8 @@ ['OS=="ios"', { 'dependencies': [ '../ios/ios.gyp:*', + '../ui/base/ui_base_tests.gyp:ui_unittests', '../ui/gfx/gfx_tests.gyp:gfx_unittests', - '../ui/ui_unittests.gyp:ui_unittests', ], }], ['OS=="android"', { @@ -270,9 +270,9 @@ '../net/net.gyp:net_unittests', '../sql/sql.gyp:sql_unittests', '../sync/sync.gyp:sync_unit_tests', + '../ui/base/ui_base_tests.gyp:ui_unittests', '../ui/display/display.gyp:display_unittests', '../ui/gfx/gfx_tests.gyp:gfx_unittests', - '../ui/ui_unittests.gyp:ui_unittests', '../url/url.gyp:url_unittests', ], 'conditions': [ @@ -770,8 +770,8 @@ '../tools/android/android_tools.gyp:android_tools', '../tools/android/android_tools.gyp:memconsumer', '../tools/android/findbugs_plugin/findbugs_plugin.gyp:findbugs_plugin_test', + '../ui/base/ui_base_tests.gyp:ui_unittests', '../ui/events/events.gyp:events_unittests', - '../ui/ui_unittests.gyp:ui_unittests', # Unit test bundles packaged as an apk. '../android_webview/android_webview.gyp:android_webview_test_apk', '../android_webview/android_webview.gyp:android_webview_unittests_apk', @@ -796,9 +796,9 @@ '../sql/sql.gyp:sql_unittests_apk', '../sync/sync.gyp:sync_unit_tests_apk', '../tools/android/heap_profiler/heap_profiler.gyp:heap_profiler_unittests_apk', + '../ui/base/ui_base_tests.gyp:ui_unittests_apk', '../ui/events/events.gyp:events_unittests_apk', '../ui/gfx/gfx_tests.gyp:gfx_unittests_apk', - '../ui/ui_unittests.gyp:ui_unittests_apk', ], }, { @@ -862,8 +862,8 @@ '../third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests', '../tools/perf/clear_system_cache/clear_system_cache.gyp:*', '../tools/telemetry/telemetry.gyp:*', + '../ui/base/ui_base_tests.gyp:ui_unittests', '../ui/gfx/gfx_tests.gyp:gfx_unittests', - '../ui/ui_unittests.gyp:ui_unittests', '../url/url.gyp:url_unittests', ], }, @@ -899,8 +899,8 @@ '../third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests', '../tools/perf/clear_system_cache/clear_system_cache.gyp:*', '../tools/telemetry/telemetry.gyp:*', + '../ui/base/ui_base_tests.gyp:ui_unittests', '../ui/gfx/gfx_tests.gyp:gfx_unittests', - '../ui/ui_unittests.gyp:ui_unittests', '../url/url.gyp:url_unittests', ], }, @@ -947,8 +947,8 @@ '../third_party/leveldatabase/leveldatabase.gyp:env_chromium_unittests', '../third_party/libaddressinput/libaddressinput.gyp:libaddressinput_unittests', '../third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests', + '../ui/base/ui_base_tests.gyp:ui_unittests', '../ui/gfx/gfx_tests.gyp:gfx_unittests', - '../ui/ui_unittests.gyp:ui_unittests', '../url/url.gyp:url_unittests', ], }, @@ -998,9 +998,9 @@ '../third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests', '../tools/perf/clear_system_cache/clear_system_cache.gyp:*', '../tools/telemetry/telemetry.gyp:*', + '../ui/base/ui_base_tests.gyp:ui_unittests', '../ui/events/events.gyp:events_unittests', '../ui/gfx/gfx_tests.gyp:gfx_unittests', - '../ui/ui_unittests.gyp:ui_unittests', '../ui/views/views.gyp:views_unittests', '../url/url.gyp:url_unittests', ], @@ -1140,8 +1140,8 @@ '../sql/sql.gyp:sql_unittests', '../sync/sync.gyp:sync_unit_tests', '../third_party/widevine/cdm/widevine_cdm.gyp:widevinecdmadapter', + '../ui/base/ui_base_tests.gyp:ui_unittests', '../ui/gfx/gfx_tests.gyp:gfx_unittests', - '../ui/ui_unittests.gyp:ui_unittests', '../ui/views/views.gyp:views_unittests', '../url/url.gyp:url_unittests', ], @@ -1184,6 +1184,7 @@ '../remoting/remoting.gyp:remoting_unittests', '../ui/app_list/app_list.gyp:*', '../ui/aura/aura.gyp:*', + '../ui/base/ui_base_tests.gyp:ui_unittests', '../ui/compositor/compositor.gyp:*', '../ui/display/display.gyp:display_unittests', '../ui/events/events.gyp:*', @@ -1191,7 +1192,6 @@ '../ui/keyboard/keyboard.gyp:*', '../ui/message_center/message_center.gyp:*', '../ui/snapshot/snapshot.gyp:snapshot_unittests', - '../ui/ui_unittests.gyp:ui_unittests', '../ui/views/examples/examples.gyp:views_examples_with_content_exe', '../ui/views/views.gyp:views', '../ui/views/views.gyp:views_unittests', diff --git a/build/android/pylib/gtest/setup.py b/build/android/pylib/gtest/setup.py index da885c0..b278c09 100644 --- a/build/android/pylib/gtest/setup.py +++ b/build/android/pylib/gtest/setup.py @@ -40,7 +40,7 @@ _ISOLATE_FILE_PATHS = { 'media_unittests': 'media/media_unittests.isolate', 'net_unittests': 'net/net_unittests.isolate', 'sql_unittests': 'sql/sql_unittests.isolate', - 'ui_unittests': 'ui/ui_unittests.isolate', + 'ui_unittests': 'ui/base/ui_base_tests.isolate', 'unit_tests': 'chrome/unit_tests.isolate', 'webkit_unit_tests': 'third_party/WebKit/Source/web/WebKitUnitTests.isolate', diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 1db4713..e97ccc3 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -443,7 +443,7 @@ '../content/content_shell_and_tests.gyp:content_shell', '../content/content_shell_and_tests.gyp:content_unittests', '../net/net.gyp:net_unittests', - '../ui/ui_unittests.gyp:ui_unittests', + '../ui/base/ui_base_tests.gyp:ui_unittests', ], }, { diff --git a/ui/base/ui_base_tests.gyp b/ui/base/ui_base_tests.gyp new file mode 100644 index 0000000..d95c0de --- /dev/null +++ b/ui/base/ui_base_tests.gyp @@ -0,0 +1,266 @@ +# Copyright 2013 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'variables': { + 'chromium_code': 1, + }, + 'targets': [ + { + # TODO(tfarina): Rename this target to ui_base_unittests. + # In order to do this we will need to keep this target, add a dummy + # ui_base_unittests target that just points to ui_unittests, change + # buildbot code to reference the new 'ui_base_unittests' target. + # After buildbot is updated, we can make the changes in Chromium and + # remove 'ui_unittests' target. crbug.com/331829 + 'target_name': 'ui_unittests', + 'type': '<(gtest_target_type)', + 'dependencies': [ + '../../base/base.gyp:base', + '../../base/base.gyp:test_support_base', + '../../net/net.gyp:net', + '../../skia/skia.gyp:skia', + '../../testing/gmock.gyp:gmock', + '../../testing/gtest.gyp:gtest', + '../../third_party/icu/icu.gyp:icui18n', + '../../third_party/icu/icu.gyp:icuuc', + '../../url/url.gyp:url_lib', + '../events/events.gyp:events_base', + '../gfx/gfx.gyp:gfx_test_support', + '../resources/ui_resources.gyp:ui_resources', + '../resources/ui_resources.gyp:ui_test_pak', + '../strings/ui_strings.gyp:ui_strings', + 'ui_base.gyp:ui_base', + 'ui_base.gyp:ui_base_test_support', + ], + # iOS uses a small subset of ui. common_sources are the only files that + # are built on iOS. + 'common_sources' : [ + # Note: file list duplicated in GN build. + 'layout_unittest.cc', + 'l10n/l10n_util_mac_unittest.mm', + 'l10n/l10n_util_unittest.cc', + 'l10n/l10n_util_win_unittest.cc', + 'l10n/time_format_unittest.cc', + 'models/tree_node_iterator_unittest.cc', + 'resource/data_pack_literal.cc', + 'resource/data_pack_unittest.cc', + 'resource/resource_bundle_unittest.cc', + 'test/run_all_unittests.cc', + ], + 'all_sources': [ + # Note: file list duplicated in GN build. + '<@(_common_sources)', + 'accelerators/accelerator_manager_unittest.cc', + 'accelerators/menu_label_accelerator_util_linux_unittest.cc', + 'clipboard/custom_data_helper_unittest.cc', + 'cocoa/base_view_unittest.mm', + 'cocoa/cocoa_base_utils_unittest.mm', + 'cocoa/controls/blue_label_button_unittest.mm', + 'cocoa/controls/hover_image_menu_button_unittest.mm', + 'cocoa/controls/hyperlink_button_cell_unittest.mm', + 'cocoa/focus_tracker_unittest.mm', + 'cocoa/fullscreen_window_manager_unittest.mm', + 'cocoa/hover_image_button_unittest.mm', + 'cocoa/menu_controller_unittest.mm', + 'cocoa/nsgraphics_context_additions_unittest.mm', + 'cocoa/tracking_area_unittest.mm', + 'dragdrop/os_exchange_data_provider_aurax11_unittest.cc', + 'ime/candidate_window_unittest.cc', + 'ime/chromeos/character_composer_unittest.cc', + 'ime/composition_text_util_pango_unittest.cc', + 'ime/input_method_base_unittest.cc', + 'ime/input_method_chromeos_unittest.cc', + 'ime/remote_input_method_win_unittest.cc', + 'ime/win/imm32_manager_unittest.cc', + 'ime/win/tsf_input_scope_unittest.cc', + 'models/list_model_unittest.cc', + 'models/list_selection_model_unittest.cc', + 'models/tree_node_model_unittest.cc', + 'test/data/resource.h', + 'text/bytes_formatting_unittest.cc', + 'view_prop_unittest.cc', + 'webui/web_ui_util_unittest.cc', + 'x/selection_requestor_unittest.cc', + ], + 'include_dirs': [ + '../..', + ], + 'conditions': [ + ['OS!="ios"', { + 'sources' : ['<@(_all_sources)'], + }, { # OS=="ios" + 'sources' : [ + '<@(_common_sources)', + ], + # The ResourceBundle unittest expects a locale.pak file to exist in + # the bundle for English-US. Copy it in from where it was generated + # by ui_resources.gyp:ui_test_pak. + 'mac_bundle_resources': [ + '<(PRODUCT_DIR)/ui/en.lproj/locale.pak', + ], + 'actions': [ + { + 'action_name': 'copy_test_data', + 'variables': { + 'test_data_files': [ + 'test/data', + ], + 'test_data_prefix' : 'ui/base', + }, + 'includes': [ '../../build/copy_test_data_ios.gypi' ], + }, + ], + }], + ['OS == "win"', { + 'sources': [ + 'dragdrop/os_exchange_data_win_unittest.cc', + 'win/hwnd_subclass_unittest.cc', + 'win/open_file_name_win_unittest.cc', + ], + 'msvs_settings': { + 'VCLinkerTool': { + 'DelayLoadDLLs': [ + 'd2d1.dll', + 'd3d10_1.dll', + ], + 'AdditionalDependencies': [ + 'd2d1.lib', + 'd3d10_1.lib', + ], + }, + }, + 'link_settings': { + 'libraries': [ + '-limm32.lib', + '-loleacc.lib', + ], + }, + # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. + 'msvs_disabled_warnings': [ 4267, ], + }], + ['OS == "android"', { + 'dependencies': [ + '../../testing/android/native_test.gyp:native_test_native_code', + ], + }], + ['use_pango == 1', { + 'dependencies': [ + '../../build/linux/system.gyp:pangocairo', + ], + 'conditions': [ + ['use_allocator!="none"', { + 'dependencies': [ + '../../base/allocator/allocator.gyp:allocator', + ], + }], + ], + }], + ['use_x11==1', { + 'dependencies': [ + '../../build/linux/system.gyp:x11', + '../../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', + '../events/platform/x11/x11_events_platform.gyp:x11_events_platform', + '../gfx/x/gfx_x11.gyp:gfx_x11', + ], + }], + ['OS!="win" or use_aura==0', { + 'sources!': [ + 'view_prop_unittest.cc', + ], + }], + ['use_x11==1 and use_aura==1', { + 'sources': [ + 'cursor/cursor_loader_x11_unittest.cc', + ], + }], + ['OS=="mac"', { + 'dependencies': [ + '../../third_party/mozilla/mozilla.gyp:mozilla', + '../events/events.gyp:events_test_support', + 'ui_base_tests_bundle', + ], + 'conditions': [ + ['component=="static_library"', { + # Needed for mozilla.gyp. + 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, + }], + ], + }], + ['use_aura==1 or toolkit_views==1', { + 'sources': [ + 'dragdrop/os_exchange_data_unittest.cc', + ], + 'dependencies': [ + '../events/events.gyp:events', + '../events/events.gyp:events_base', + '../events/events.gyp:events_test_support', + '../events/platform/events_platform.gyp:events_platform', + ], + }], + ['chromeos==1', { + 'dependencies': [ + '../../chromeos/chromeos.gyp:chromeos', + '../aura/aura.gyp:aura_test_support', + '../chromeos/ui_chromeos.gyp:ui_chromeos', + '../events/events.gyp:gesture_detection', + ], + 'sources': [ + '../chromeos/touch_exploration_controller_unittest.cc' + ], + 'sources!': [ + 'dragdrop/os_exchange_data_provider_aurax11_unittest.cc', + 'x/selection_requestor_unittest.cc', + ], + }], + ['use_x11==0', { + 'sources!': [ + 'ime/chromeos/character_composer_unittest.cc', + 'ime/input_method_chromeos_unittest.cc', + 'ime/composition_text_util_pango_unittest.cc', + ], + }], + ], + 'target_conditions': [ + ['OS == "ios"', { + 'sources/': [ + # Pull in specific Mac files for iOS (which have been filtered out + # by file name rules). + ['include', '^l10n/l10n_util_mac_unittest\\.mm$'], + ], + }], + ], + }, + ], + 'conditions': [ + # Mac target to build a test Framework bundle to mock out resource loading. + ['OS == "mac"', { + 'targets': [ + { + 'target_name': 'ui_base_tests_bundle', + 'type': 'shared_library', + 'dependencies': [ + '../resources/ui_resources.gyp:ui_test_pak', + ], + 'includes': [ 'ui_base_tests_bundle.gypi' ], + }, + ], + }], + ['OS == "android"', { + 'targets': [ + { + 'target_name': 'ui_unittests_apk', + 'type': 'none', + 'dependencies': [ + 'ui_unittests', + ], + 'variables': { + 'test_suite_name': 'ui_unittests', + }, + 'includes': [ '../../build/apk_test.gypi' ], + }, + ], + }], + ], +} diff --git a/ui/ui_unittests.isolate b/ui/base/ui_base_tests.isolate index e9a927c..3e393a8 100644 --- a/ui/ui_unittests.isolate +++ b/ui/base/ui_base_tests.isolate @@ -6,13 +6,13 @@ ['OS=="android"', { 'variables': { 'isolate_dependency_tracked': [ - 'base/test/data/data_pack_unittest/truncated-header.pak', + 'test/data/data_pack_unittest/truncated-header.pak', '<(PRODUCT_DIR)/locales/en-US.pak', ], }, }], ], 'includes': [ - '../third_party/icu/icu.isolate', + '../../third_party/icu/icu.isolate', ], } diff --git a/ui/ui_unittests_bundle.gypi b/ui/base/ui_base_tests_bundle.gypi index 94ef939..956e28a 100644 --- a/ui/ui_unittests_bundle.gypi +++ b/ui/base/ui_base_tests_bundle.gypi @@ -20,15 +20,15 @@ 'DYLIB_INSTALL_NAME_BASE': '@executable_path/../Versions/1.0.0.0', 'LD_DYLIB_INSTALL_NAME': '$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(WRAPPER_NAME)/$(PRODUCT_NAME)', - 'INFOPLIST_FILE': 'base/test/framework-Info.plist', + 'INFOPLIST_FILE': 'test/framework-Info.plist', }, 'mac_bundle_resources': [ - 'base/test/framework-Info.plist', + 'test/framework-Info.plist', '<(PRODUCT_DIR)/ui_test.pak', '<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(locales))', ], 'mac_bundle_resources!': [ - 'base/test/framework-Info.plist', + 'test/framework-Info.plist', ], 'postbuilds': [ { diff --git a/ui/ui_unittests.gyp b/ui/ui_unittests.gyp deleted file mode 100644 index 5b514ce7..0000000 --- a/ui/ui_unittests.gyp +++ /dev/null @@ -1,260 +0,0 @@ -# Copyright 2013 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'variables': { - 'chromium_code': 1, - }, - 'targets': [ - { - 'target_name': 'ui_unittests', - 'type': '<(gtest_target_type)', - 'dependencies': [ - '../base/base.gyp:base', - '../base/base.gyp:test_support_base', - '../net/net.gyp:net', - '../skia/skia.gyp:skia', - '../testing/gmock.gyp:gmock', - '../testing/gtest.gyp:gtest', - '../third_party/icu/icu.gyp:icui18n', - '../third_party/icu/icu.gyp:icuuc', - '../url/url.gyp:url_lib', - 'base/ui_base.gyp:ui_base', - 'base/ui_base.gyp:ui_base_test_support', - 'events/events.gyp:events_base', - 'gfx/gfx.gyp:gfx_test_support', - 'resources/ui_resources.gyp:ui_resources', - 'resources/ui_resources.gyp:ui_test_pak', - 'strings/ui_strings.gyp:ui_strings', - ], - # iOS uses a small subset of ui. common_sources are the only files that - # are built on iOS. - 'common_sources' : [ - # Note: file list duplicated in GN build. - 'base/layout_unittest.cc', - 'base/l10n/l10n_util_mac_unittest.mm', - 'base/l10n/l10n_util_unittest.cc', - 'base/l10n/l10n_util_win_unittest.cc', - 'base/l10n/time_format_unittest.cc', - 'base/models/tree_node_iterator_unittest.cc', - 'base/resource/data_pack_literal.cc', - 'base/resource/data_pack_unittest.cc', - 'base/resource/resource_bundle_unittest.cc', - 'base/test/run_all_unittests.cc', - ], - 'all_sources': [ - # Note: file list duplicated in GN build. - '<@(_common_sources)', - 'base/accelerators/accelerator_manager_unittest.cc', - 'base/accelerators/menu_label_accelerator_util_linux_unittest.cc', - 'base/clipboard/custom_data_helper_unittest.cc', - 'base/cocoa/base_view_unittest.mm', - 'base/cocoa/cocoa_base_utils_unittest.mm', - 'base/cocoa/controls/blue_label_button_unittest.mm', - 'base/cocoa/controls/hover_image_menu_button_unittest.mm', - 'base/cocoa/controls/hyperlink_button_cell_unittest.mm', - 'base/cocoa/focus_tracker_unittest.mm', - 'base/cocoa/fullscreen_window_manager_unittest.mm', - 'base/cocoa/hover_image_button_unittest.mm', - 'base/cocoa/menu_controller_unittest.mm', - 'base/cocoa/nsgraphics_context_additions_unittest.mm', - 'base/cocoa/tracking_area_unittest.mm', - 'base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc', - 'base/ime/candidate_window_unittest.cc', - 'base/ime/chromeos/character_composer_unittest.cc', - 'base/ime/composition_text_util_pango_unittest.cc', - 'base/ime/input_method_base_unittest.cc', - 'base/ime/input_method_chromeos_unittest.cc', - 'base/ime/remote_input_method_win_unittest.cc', - 'base/ime/win/imm32_manager_unittest.cc', - 'base/ime/win/tsf_input_scope_unittest.cc', - 'base/models/list_model_unittest.cc', - 'base/models/list_selection_model_unittest.cc', - 'base/models/tree_node_model_unittest.cc', - 'base/test/data/resource.h', - 'base/text/bytes_formatting_unittest.cc', - 'base/view_prop_unittest.cc', - 'base/webui/web_ui_util_unittest.cc', - 'base/x/selection_requestor_unittest.cc', - ], - 'include_dirs': [ - '../', - ], - 'conditions': [ - ['OS!="ios"', { - 'sources' : ['<@(_all_sources)'], - }, { # OS=="ios" - 'sources' : [ - '<@(_common_sources)', - ], - # The ResourceBundle unittest expects a locale.pak file to exist in - # the bundle for English-US. Copy it in from where it was generated - # by ui_resources.gyp:ui_test_pak. - 'mac_bundle_resources': [ - '<(PRODUCT_DIR)/ui/en.lproj/locale.pak', - ], - 'actions': [ - { - 'action_name': 'copy_test_data', - 'variables': { - 'test_data_files': [ - 'base/test/data', - ], - 'test_data_prefix' : 'ui', - }, - 'includes': [ '../build/copy_test_data_ios.gypi' ], - }, - ], - }], - ['OS == "win"', { - 'sources': [ - 'base/dragdrop/os_exchange_data_win_unittest.cc', - 'base/win/hwnd_subclass_unittest.cc', - 'base/win/open_file_name_win_unittest.cc', - ], - 'msvs_settings': { - 'VCLinkerTool': { - 'DelayLoadDLLs': [ - 'd2d1.dll', - 'd3d10_1.dll', - ], - 'AdditionalDependencies': [ - 'd2d1.lib', - 'd3d10_1.lib', - ], - }, - }, - 'link_settings': { - 'libraries': [ - '-limm32.lib', - '-loleacc.lib', - ], - }, - # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. - 'msvs_disabled_warnings': [ 4267, ], - }], - ['OS == "android"', { - 'dependencies': [ - '../testing/android/native_test.gyp:native_test_native_code', - ], - }], - ['use_pango == 1', { - 'dependencies': [ - '../build/linux/system.gyp:pangocairo', - ], - 'conditions': [ - ['use_allocator!="none"', { - 'dependencies': [ - '../base/allocator/allocator.gyp:allocator', - ], - }], - ], - }], - ['use_x11==1', { - 'dependencies': [ - '../build/linux/system.gyp:x11', - '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', - 'events/platform/x11/x11_events_platform.gyp:x11_events_platform', - 'gfx/x/gfx_x11.gyp:gfx_x11', - ], - }], - ['OS!="win" or use_aura==0', { - 'sources!': [ - 'base/view_prop_unittest.cc', - ], - }], - ['use_x11==1 and use_aura==1', { - 'sources': [ - 'base/cursor/cursor_loader_x11_unittest.cc', - ], - }], - ['OS=="mac"', { - 'dependencies': [ - '../third_party/mozilla/mozilla.gyp:mozilla', - 'events/events.gyp:events_test_support', - 'ui_unittests_bundle', - ], - 'conditions': [ - ['component=="static_library"', { - # Needed for mozilla.gyp. - 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, - }], - ], - }], - ['use_aura==1 or toolkit_views==1', { - 'sources': [ - 'base/dragdrop/os_exchange_data_unittest.cc', - ], - 'dependencies': [ - 'events/events.gyp:events', - 'events/events.gyp:events_base', - 'events/events.gyp:events_test_support', - 'events/platform/events_platform.gyp:events_platform', - ], - }], - ['chromeos==1', { - 'dependencies': [ - '../chromeos/chromeos.gyp:chromeos', - 'aura/aura.gyp:aura_test_support', - 'chromeos/ui_chromeos.gyp:ui_chromeos', - 'events/events.gyp:gesture_detection', - ], - 'sources': [ - 'chromeos/touch_exploration_controller_unittest.cc' - ], - 'sources!': [ - 'base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc', - 'base/x/selection_requestor_unittest.cc', - ], - }], - ['use_x11==0', { - 'sources!': [ - 'base/ime/chromeos/character_composer_unittest.cc', - 'base/ime/input_method_chromeos_unittest.cc', - 'base/ime/composition_text_util_pango_unittest.cc', - ], - }], - ], - 'target_conditions': [ - ['OS == "ios"', { - 'sources/': [ - # Pull in specific Mac files for iOS (which have been filtered out - # by file name rules). - ['include', '^base/l10n/l10n_util_mac_unittest\\.mm$'], - ], - }], - ], - }, - ], - 'conditions': [ - # Mac target to build a test Framework bundle to mock out resource loading. - ['OS == "mac"', { - 'targets': [ - { - 'target_name': 'ui_unittests_bundle', - 'type': 'shared_library', - 'dependencies': [ - 'resources/ui_resources.gyp:ui_test_pak', - ], - 'includes': [ 'ui_unittests_bundle.gypi' ], - }, - ], - }], - ['OS == "android"', { - 'targets': [ - { - 'target_name': 'ui_unittests_apk', - 'type': 'none', - 'dependencies': [ - 'ui_unittests', - ], - 'variables': { - 'test_suite_name': 'ui_unittests', - }, - 'includes': [ '../build/apk_test.gypi' ], - }, - ], - }], - ], -} |
