chromium/ios/chrome/browser/ui/settings/content_settings/BUILD.gn

# Copyright 2021 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

source_set("content_settings") {
  sources = [
    "block_popups_table_view_controller.h",
    "block_popups_table_view_controller.mm",
    "content_settings_table_view_controller.h",
    "content_settings_table_view_controller.mm",
    "default_page_mode_coordinator.h",
    "default_page_mode_coordinator.mm",
    "default_page_mode_mediator.h",
    "default_page_mode_mediator.mm",
    "web_inspector_state_coordinator.h",
    "web_inspector_state_coordinator.mm",
    "web_inspector_state_mediator.h",
    "web_inspector_state_mediator.mm",
  ]
  deps = [
    ":content_settings_ui",
    "//base",
    "//components/content_settings/core/browser",
    "//components/content_settings/core/common",
    "//components/feature_engagement/public",
    "//components/prefs",
    "//components/strings",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/content_settings/model",
    "//ios/chrome/browser/feature_engagement/model",
    "//ios/chrome/browser/mailto_handler/model",
    "//ios/chrome/browser/mailto_handler/model:mailto_handler_factory",
    "//ios/chrome/browser/net/model:crurl",
    "//ios/chrome/browser/ntp/ui_bundled:feature_flags",
    "//ios/chrome/browser/shared/coordinator/chrome_coordinator",
    "//ios/chrome/browser/shared/model/browser",
    "//ios/chrome/browser/shared/model/browser_state",
    "//ios/chrome/browser/shared/model/prefs",
    "//ios/chrome/browser/shared/model/prefs:pref_names",
    "//ios/chrome/browser/shared/model/profile",
    "//ios/chrome/browser/shared/model/utils",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/shared/ui/table_view:utils",
    "//ios/chrome/browser/shared/ui/table_view/cells",
    "//ios/chrome/browser/ui/settings:constants",
    "//ios/chrome/browser/ui/settings:settings_root",
    "//ios/chrome/browser/ui/settings/cells",
    "//ios/chrome/browser/ui/settings/elements:enterprise_info_popover_view_controller",
    "//ios/chrome/browser/ui/settings/utils",
    "//ios/chrome/browser/web/model/annotations",
    "//ios/web/common:features",
    "//ui/base",
  ]
}

source_set("content_settings_ui") {
  sources = [
    "default_page_mode.h",
    "default_page_mode_consumer.h",
    "default_page_mode_table_view_controller.h",
    "default_page_mode_table_view_controller.mm",
    "default_page_mode_table_view_controller_delegate.h",
    "web_inspector_state_consumer.h",
    "web_inspector_state_table_view_controller.h",
    "web_inspector_state_table_view_controller.mm",
    "web_inspector_state_table_view_controller_delegate.h",
  ]
  deps = [
    "//base",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/shared/ui/table_view:utils",
    "//ios/chrome/browser/shared/ui/table_view/cells",
    "//ios/chrome/browser/ui/settings:settings_root",
    "//ui/base",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "block_popups_table_view_controller_unittest.mm",
    "content_settings_table_view_controller_unittest.mm",
    "default_page_mode_mediator_unittest.mm",
    "default_page_mode_table_view_controller_unittest.mm",
    "web_inspector_state_mediator_unittest.mm",
    "web_inspector_state_table_view_controller_unittest.mm",
  ]
  deps = [
    ":content_settings",
    ":content_settings_ui",
    "//base/test:test_support",
    "//components/content_settings/core/browser",
    "//components/feature_engagement/public",
    "//components/feature_engagement/test:test_support",
    "//components/prefs:test_support",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/content_settings/model",
    "//ios/chrome/browser/shared/model/browser/test:test_support",
    "//ios/chrome/browser/shared/model/prefs:pref_names",
    "//ios/chrome/browser/shared/model/profile/test",
    "//ios/chrome/browser/shared/ui/table_view:test_support",
    "//ios/chrome/browser/shared/ui/table_view/cells",
    "//ios/web/common:features",
    "//ios/web/public/test",
    "//testing/gtest",
    "//third_party/ocmock",
    "//ui/base",
  ]
}

source_set("eg_app_support+eg2") {
  testonly = true
  sources = [
    "block_popups_app_interface.h",
    "block_popups_app_interface.mm",
  ]
  deps = [
    ":content_settings",
    "//base",
    "//components/content_settings/core/browser",
    "//components/content_settings/core/common",
    "//ios/chrome/app:app_internal",
    "//ios/chrome/browser/content_settings/model",
    "//ios/chrome/browser/shared/model/browser_state",
    "//ios/chrome/browser/shared/model/profile",
    "//ios/chrome/test/app:test_support",
  ]
}

source_set("eg_test_support+eg2") {
  testonly = true
  sources = [
    "block_popups_app_interface.h",
    "block_popups_app_interface_stub.mm",
  ]
  deps = [
    "//base",
    "//components/content_settings/core/common",
    "//ios/testing/earl_grey:eg_test_support+eg2",
  ]
}

source_set("eg2_tests") {
  configs += [ "//build/config/ios:xctest_config" ]
  testonly = true
  sources = [ "block_popups_egtest.mm" ]
  deps = [
    ":eg_test_support+eg2",
    "//base",
    "//base/test:test_support",
    "//build:branding_buildflags",
    "//components/strings",
    "//ios/chrome/app/strings",
    "//ios/chrome/test/earl_grey:eg_test_support+eg2",
    "//ios/testing/earl_grey:eg_test_support+eg2",
    "//ios/web/public/test/http_server",
    "//net:test_support",
    "//ui/base",
    "//url",
  ]
}