blob: 2cd29d7566b4a03c0fdf1edfe62158752bb6403a [file] [log] [blame]
# Copyright 2015 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.
import("//ios/build/chrome_build.gni")
import("//ios/build/config.gni")
import("//ios/chrome/features.gni")
import("//ios/public/provider/chrome/browser/build_config.gni")
import("//testing/test.gni")
import("//third_party/protobuf/proto_library.gni")
# All tests needs to be listed in that target to be built as part of
# "gn_all" target (i.e. by the bots).
group("all_tests") {
testonly = true
deps = [
":ios_chrome_perftests",
":ios_chrome_unittests",
"//ios/chrome/test/xcuitest:ios_chrome_device_check_xcuitests_module",
"//ios/chrome/test/xcuitest:ios_chrome_xcuitests",
]
}
source_set("test_support") {
configs += [ "//build/config/compiler:enable_arc" ]
testonly = true
sources = [
"ios_chrome_scoped_testing_chrome_browser_provider.h",
"ios_chrome_scoped_testing_chrome_browser_provider.mm",
"ios_chrome_scoped_testing_chrome_browser_state_manager.cc",
"ios_chrome_scoped_testing_chrome_browser_state_manager.h",
"ios_chrome_scoped_testing_local_state.cc",
"ios_chrome_scoped_testing_local_state.h",
"ios_chrome_unit_test_suite.h",
"ios_chrome_unit_test_suite.mm",
"root_view_controller_test.h",
"root_view_controller_test.mm",
"scoped_key_window.h",
"scoped_key_window.mm",
"testing_application_context.h",
"testing_application_context.mm",
]
public_deps = [ ":block_cleanup_test" ]
deps = [
"//base",
"//base/test:test_support",
"//components/content_settings/core/browser",
"//components/content_settings/core/common",
"//components/network_time",
"//components/prefs",
"//components/prefs:test_support",
"//components/safe_browsing/core:features",
"//ios/chrome/browser",
"//ios/chrome/browser/browser_state",
"//ios/chrome/browser/browser_state:browser_state_impl",
"//ios/chrome/browser/content_settings",
"//ios/chrome/browser/policy:policy",
"//ios/chrome/browser/prefs:browser_prefs",
"//ios/chrome/browser/safe_browsing:test_support",
"//ios/chrome/browser/ui/util",
"//ios/components/webui:url_constants",
"//ios/public/provider/chrome/browser",
"//ios/public/provider/chrome/browser:test_support",
"//ios/web",
"//ios/web/public/test",
"//net",
"//services/network:test_support",
"//testing/gmock",
"//testing/gtest",
"//ui/base",
"//url",
]
}
source_set("eg_test_support+eg2") {
defines = [ "CHROME_EARL_GREY_2" ]
configs += [
"//build/config/compiler:enable_arc",
"//build/config/ios:xctest_config",
]
testonly = true
sources = [
"scoped_eg_synchronization_disabler.h",
"scoped_eg_synchronization_disabler.mm",
]
deps = [
"//base",
"//ios/testing/earl_grey:eg_test_support+eg2",
"//ios/third_party/earl_grey2:test_lib",
]
frameworks = [ "XCTest.framework" ]
all_dependent_configs = [ "//third_party/protobuf:protobuf_config" ]
}
source_set("block_cleanup_test") {
# TODO(crbug.com/733237): Replace this comment with an explicit disable_arc config.
# The files in this target depend on non-ARC memory management.
testonly = true
sources = [
"block_cleanup_test.h",
"block_cleanup_test.mm",
]
deps = [
"//base",
"//testing/gtest",
]
}
source_set("run_all_unittests") {
testonly = true
sources = [ "run_all_unittests.cc" ]
deps = [
":test_support",
"//base",
"//base/test:test_support",
"//ios/chrome/app/startup:startup_basic",
"//mojo/core/embedder",
]
if (ios_chrome_links_with_material_components_framework) {
public_deps = [
"//ios/third_party/material_components_ios:material_components_ios+bundle",
"//ios/third_party/material_components_ios:material_components_ios+link",
]
} else {
assert_no_deps = [
"//ios/third_party/material_components_ios:material_components_ios+bundle",
"//ios/third_party/material_components_ios:material_components_ios+link",
]
}
}
test("ios_chrome_perftests") {
deps = [
# Ensure that all perf tests are run, use fake hooks and pack resources.
":run_all_unittests",
"//ios/chrome/app:tests_fake_hook",
"//ios/chrome/app/resources:packed_resources",
"//ios/chrome/browser/ui/main",
# Add perf_tests target here.
"//ios/chrome/browser/ui/ntp:perf_tests",
"//ios/chrome/browser/ui/omnibox:perf_tests",
"//ios/chrome/browser/web:perf_tests",
]
assert_no_deps = ios_assert_no_deps
}
bundle_data_ib_file("base_scene_storyboard") {
source = "BaseScene.storyboard"
}
test("ios_chrome_unittests") {
info_plist = "//ios/chrome/test/unittest-scene-lifecycle-Info.plist"
deps = [
# Ensure that all unit tests are run, use fake hooks and pack resources.
":run_all_unittests",
"//ios/chrome/app:tests_fake_hook",
"//ios/chrome/app/resources:packed_resources",
# Add unit_tests target here.
"//ios/chrome/app:unit_tests",
"//ios/chrome/app/application_delegate:unit_tests",
"//ios/chrome/app/spotlight:unit_tests",
"//ios/chrome/app/startup:unit_tests",
"//ios/chrome/browser:unit_tests",
"//ios/chrome/browser/app_launcher:unit_tests",
"//ios/chrome/browser/autofill:unit_tests",
"//ios/chrome/browser/autofill/manual_fill:unit_tests",
"//ios/chrome/browser/browser_state:unit_tests",
"//ios/chrome/browser/browsing_data:unit_tests",
"//ios/chrome/browser/complex_tasks:unit_tests",
"//ios/chrome/browser/crash_report:unit_tests",
"//ios/chrome/browser/crash_report/breadcrumbs:unit_tests",
"//ios/chrome/browser/device_sharing:unit_tests",
"//ios/chrome/browser/download:unit_tests",
"//ios/chrome/browser/favicon:unit_tests",
"//ios/chrome/browser/find_in_page:unit_tests",
"//ios/chrome/browser/flags:unit_tests",
"//ios/chrome/browser/geolocation:unit_tests",
"//ios/chrome/browser/history:unit_tests",
"//ios/chrome/browser/infobars:unit_tests",
"//ios/chrome/browser/infobars/overlays:unit_tests",
"//ios/chrome/browser/infobars/overlays/browser_agent:unit_tests",
"//ios/chrome/browser/infobars/overlays/browser_agent/interaction_handlers/common:unit_tests",
"//ios/chrome/browser/infobars/overlays/browser_agent/interaction_handlers/confirm:unit_tests",
"//ios/chrome/browser/infobars/overlays/browser_agent/interaction_handlers/passwords:unit_tests",
"//ios/chrome/browser/infobars/overlays/browser_agent/interaction_handlers/save_address_profile:unit_tests",
"//ios/chrome/browser/infobars/overlays/browser_agent/interaction_handlers/save_card:unit_tests",
"//ios/chrome/browser/infobars/overlays/browser_agent/interaction_handlers/translate:unit_tests",
"//ios/chrome/browser/itunes_urls:unit_tests",
"//ios/chrome/browser/json_parser:unit_tests",
"//ios/chrome/browser/language:unit_tests",
"//ios/chrome/browser/link_to_text:unit_tests",
"//ios/chrome/browser/main:unit_tests",
"//ios/chrome/browser/metrics:unit_tests",
"//ios/chrome/browser/metrics:unit_tests_internal",
"//ios/chrome/browser/net:unit_tests",
"//ios/chrome/browser/ntp:unit_tests",
"//ios/chrome/browser/omaha:unit_tests",
"//ios/chrome/browser/open_in:unit_tests",
"//ios/chrome/browser/overlays:unit_tests",
"//ios/chrome/browser/overlays/public/common/confirmation:unit_tests",
"//ios/chrome/browser/overlays/public/web_content_area:unit_tests",
"//ios/chrome/browser/overscroll_actions:unit_tests",
"//ios/chrome/browser/passwords:unit_tests",
"//ios/chrome/browser/policy:unit_tests",
"//ios/chrome/browser/prerender:unit_tests",
"//ios/chrome/browser/reading_list:unit_tests",
"//ios/chrome/browser/safe_browsing:unit_tests",
"//ios/chrome/browser/safe_mode:unit_tests",
"//ios/chrome/browser/screenshot:unit_tests",
"//ios/chrome/browser/search_engines:unit_tests",
"//ios/chrome/browser/send_tab_to_self:unit_tests",
"//ios/chrome/browser/sessions:unit_tests",
"//ios/chrome/browser/signin:unit_tests",
"//ios/chrome/browser/snapshots:unit_tests",
"//ios/chrome/browser/ssl:unit_tests",
"//ios/chrome/browser/store_kit:unit_tests",
"//ios/chrome/browser/sync:unit_tests",
"//ios/chrome/browser/tabs:unit_tests",
"//ios/chrome/browser/translate:unit_tests",
"//ios/chrome/browser/u2f:unit_tests",
"//ios/chrome/browser/ui/activity_services:unit_tests",
"//ios/chrome/browser/ui/activity_services/activities:unit_tests",
"//ios/chrome/browser/ui/activity_services/data:unit_tests",
"//ios/chrome/browser/ui/alert_coordinator:unit_tests",
"//ios/chrome/browser/ui/alert_view:unit_tests",
"//ios/chrome/browser/ui/authentication:unit_tests",
"//ios/chrome/browser/ui/authentication/cells:unit_tests",
"//ios/chrome/browser/ui/authentication/signin:unit_tests",
"//ios/chrome/browser/ui/authentication/signin/add_account_signin:unit_tests",
"//ios/chrome/browser/ui/authentication/signin/advanced_settings_signin:unit_tests",
"//ios/chrome/browser/ui/authentication/signin/user_signin:unit_tests",
"//ios/chrome/browser/ui/authentication/unified_consent/identity_chooser:unit_tests",
"//ios/chrome/browser/ui/autofill/cells:unit_tests",
"//ios/chrome/browser/ui/autofill/manual_fill:unit_tests",
"//ios/chrome/browser/ui/badges:unit_tests",
"//ios/chrome/browser/ui/bookmarks:unit_tests",
"//ios/chrome/browser/ui/bookmarks/cells:unit_tests",
"//ios/chrome/browser/ui/broadcaster:unit_tests",
"//ios/chrome/browser/ui/browser_container:unit_tests",
"//ios/chrome/browser/ui/browser_view:unit_tests",
"//ios/chrome/browser/ui/bubble:unit_tests",
"//ios/chrome/browser/ui/collection_view:unit_tests",
"//ios/chrome/browser/ui/collection_view/cells:unit_tests",
"//ios/chrome/browser/ui/commands:unit_tests",
"//ios/chrome/browser/ui/content_suggestions:unit_tests",
"//ios/chrome/browser/ui/content_suggestions/cells:unit_tests",
"//ios/chrome/browser/ui/content_suggestions/identifier:unit_tests",
"//ios/chrome/browser/ui/default_promo:unit_tests",
"//ios/chrome/browser/ui/dialogs:unit_tests",
"//ios/chrome/browser/ui/dialogs:unit_tests_internal",
"//ios/chrome/browser/ui/download:unit_tests",
"//ios/chrome/browser/ui/elements:unit_tests",
"//ios/chrome/browser/ui/fancy_ui:unit_tests",
"//ios/chrome/browser/ui/first_run:unit_tests",
"//ios/chrome/browser/ui/fullscreen:unit_tests",
"//ios/chrome/browser/ui/gestures:unit_tests",
"//ios/chrome/browser/ui/history:unit_tests",
"//ios/chrome/browser/ui/icons:unit_tests",
"//ios/chrome/browser/ui/incognito_reauth:unit_tests",
"//ios/chrome/browser/ui/infobars:unit_tests",
"//ios/chrome/browser/ui/infobars/banners:unit_tests",
"//ios/chrome/browser/ui/keyboard:unit_tests",
"//ios/chrome/browser/ui/link_to_text:unit_tests",
"//ios/chrome/browser/ui/list_model:unit_tests",
"//ios/chrome/browser/ui/location_bar:unit_tests",
"//ios/chrome/browser/ui/main:unit_tests",
"//ios/chrome/browser/ui/main_content:unit_tests",
"//ios/chrome/browser/ui/menu:unit_tests",
"//ios/chrome/browser/ui/ntp:unit_tests",
"//ios/chrome/browser/ui/ntp_tile_views:unit_tests",
"//ios/chrome/browser/ui/omnibox:unit_tests",
"//ios/chrome/browser/ui/omnibox/keyboard_assist:unit_tests",
"//ios/chrome/browser/ui/omnibox/popup:unit_tests",
"//ios/chrome/browser/ui/open_in:unit_tests",
"//ios/chrome/browser/ui/overlays:unit_tests",
"//ios/chrome/browser/ui/overlays/infobar_banner:unit_tests",
"//ios/chrome/browser/ui/overlays/infobar_banner/confirm:unit_tests",
"//ios/chrome/browser/ui/overlays/infobar_banner/passwords:unit_tests",
"//ios/chrome/browser/ui/overlays/infobar_banner/save_address_profile:unit_tests",
"//ios/chrome/browser/ui/overlays/infobar_banner/save_card:unit_tests",
"//ios/chrome/browser/ui/overlays/infobar_banner/translate:unit_tests",
"//ios/chrome/browser/ui/overlays/infobar_modal:unit_tests",
"//ios/chrome/browser/ui/overlays/infobar_modal/passwords:unit_tests",
"//ios/chrome/browser/ui/overlays/infobar_modal/save_card:unit_tests",
"//ios/chrome/browser/ui/overlays/infobar_modal/translate:unit_tests",
"//ios/chrome/browser/ui/overlays/test_modality:unit_tests",
"//ios/chrome/browser/ui/overlays/web_content_area/alerts:unit_tests",
"//ios/chrome/browser/ui/popup_menu:unit_tests",
"//ios/chrome/browser/ui/presenters:unit_tests",
"//ios/chrome/browser/ui/qr_generator:unit_tests",
"//ios/chrome/browser/ui/reading_list:unit_tests",
"//ios/chrome/browser/ui/recent_tabs:unit_tests",
"//ios/chrome/browser/ui/sad_tab:unit_tests",
"//ios/chrome/browser/ui/safe_mode:unit_tests",
"//ios/chrome/browser/ui/settings:unit_tests",
"//ios/chrome/browser/ui/settings/autofill:unit_tests",
"//ios/chrome/browser/ui/settings/cells:unit_tests",
"//ios/chrome/browser/ui/settings/clear_browsing_data:unit_tests",
"//ios/chrome/browser/ui/settings/default_browser:unit_tests",
"//ios/chrome/browser/ui/settings/google_services:unit_tests",
"//ios/chrome/browser/ui/settings/language:unit_tests",
"//ios/chrome/browser/ui/settings/password:unit_tests",
"//ios/chrome/browser/ui/settings/password/password_details:unit_tests",
"//ios/chrome/browser/ui/settings/privacy:unit_tests",
"//ios/chrome/browser/ui/settings/safety_check:unit_tests",
"//ios/chrome/browser/ui/settings/sync:unit_tests",
"//ios/chrome/browser/ui/settings/sync/utils:unit_tests",
"//ios/chrome/browser/ui/settings/utils:unit_tests",
"//ios/chrome/browser/ui/sharing:unit_tests",
"//ios/chrome/browser/ui/side_swipe:unit_tests",
"//ios/chrome/browser/ui/tab_switcher/tab_grid:unit_tests",
"//ios/chrome/browser/ui/tab_switcher/tab_grid/grid:unit_tests",
"//ios/chrome/browser/ui/table_view:unit_tests",
"//ios/chrome/browser/ui/table_view/cells:unit_tests",
"//ios/chrome/browser/ui/tabs:unit_tests",
"//ios/chrome/browser/ui/toolbar:unit_tests",
"//ios/chrome/browser/ui/toolbar/fullscreen:unit_tests",
"//ios/chrome/browser/ui/toolbar_container:unit_tests",
"//ios/chrome/browser/ui/translate:unit_tests",
"//ios/chrome/browser/ui/util:unit_tests",
"//ios/chrome/browser/ui/voice:unit_tests",
"//ios/chrome/browser/update_client:unit_tests",
"//ios/chrome/browser/upgrade:unit_tests",
"//ios/chrome/browser/url_loading:unit_tests",
"//ios/chrome/browser/voice:unit_tests",
"//ios/chrome/browser/web:unit_tests",
"//ios/chrome/browser/web:unit_tests_internal",
"//ios/chrome/browser/web/font_size:unit_tests",
"//ios/chrome/browser/web/java_script_console:unit_tests",
"//ios/chrome/browser/web/print:unit_tests",
"//ios/chrome/browser/web_state_list:unit_tests",
"//ios/chrome/browser/web_state_list/web_usage_enabler:unit_tests",
"//ios/chrome/browser/webui:unit_tests",
"//ios/chrome/common:unit_tests",
"//ios/chrome/common/credential_provider:unit_tests",
"//ios/chrome/common/ui/reauthentication:unit_tests",
"//ios/chrome/common/ui/util:unit_tests",
"//ios/public/provider/chrome/browser/signin:unit_tests",
"//ios/testing:http_server_bundle_data",
]
if (ios_enable_search_widget_extension) {
deps += [ "//ios/chrome/search_widget_extension:unit_tests" ]
}
if (ios_enable_content_widget_extension) {
deps += [ "//ios/chrome/content_widget_extension:unit_tests" ]
}
if (ios_enable_credential_provider_extension) {
deps += [
"//ios/chrome/browser/credential_provider:unit_tests",
"//ios/chrome/credential_provider_extension:unit_tests",
]
}
assert_no_deps = ios_assert_no_deps
}