chromium/ios/chrome/browser/ui/price_notifications/BUILD.gn

# Copyright 2022 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("price_notifications") {
  sources = [
    "price_notifications_price_tracking_mediator.h",
    "price_notifications_price_tracking_mediator.mm",
    "price_notifications_view_coordinator.h",
    "price_notifications_view_coordinator.mm",
  ]

  deps = [
    ":price_notifications_ui",
    "//base",
    "//components/bookmarks/browser",
    "//components/commerce/core:commerce_constants",
    "//components/commerce/core:shopping_service",
    "//components/commerce/core/subscriptions",
    "//components/image_fetcher/core",
    "//components/payments/core",
    "//components/power_bookmarks/core",
    "//components/prefs",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/bookmarks/model",
    "//ios/chrome/browser/commerce/model:shopping_service",
    "//ios/chrome/browser/price_insights/coordinator:delegates",
    "//ios/chrome/browser/price_insights/ui:price_insights_ui",
    "//ios/chrome/browser/push_notification/model:push_notification_client",
    "//ios/chrome/browser/push_notification/model:push_notification_service",
    "//ios/chrome/browser/push_notification/model:push_notification_service_header",
    "//ios/chrome/browser/shared/coordinator/alert",
    "//ios/chrome/browser/shared/coordinator/chrome_coordinator",
    "//ios/chrome/browser/shared/model/application_context",
    "//ios/chrome/browser/shared/model/browser",
    "//ios/chrome/browser/shared/model/browser_state",
    "//ios/chrome/browser/shared/model/prefs:pref_names",
    "//ios/chrome/browser/shared/model/profile",
    "//ios/chrome/browser/shared/model/web_state_list",
    "//ios/chrome/browser/shared/public/commands",
    "//ios/chrome/browser/shared/ui/table_view",
    "//ios/chrome/browser/shared/ui/table_view:utils",
    "//ios/chrome/browser/tabs/model",
    "//ios/chrome/browser/ui/price_notifications/cells",
    "//ios/web/public",
    "//url",
  ]
}

source_set("price_notifications_ui") {
  sources = [
    "price_notifications_alert_presenter.h",
    "price_notifications_consumer.h",
    "price_notifications_mutator.h",
    "price_notifications_table_view_controller.h",
    "price_notifications_table_view_controller.mm",
  ]

  deps = [
    ":constants",
    "//base",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/net/model:crurl",
    "//ios/chrome/browser/shared/public/commands",
    "//ios/chrome/browser/shared/ui/list_model",
    "//ios/chrome/browser/shared/ui/table_view",
    "//ios/chrome/browser/shared/ui/table_view/cells",
    "//ios/chrome/browser/shared/ui/util",
    "//ios/chrome/browser/shared/ui/util:snackbar_util",
    "//ios/chrome/browser/ui/price_notifications/cells",
    "//ios/chrome/common/ui/colors",
    "//ios/chrome/common/ui/table_view:cells_constants",
    "//ios/chrome/common/ui/util",
    "//ios/third_party/material_components_ios",
    "//net",
    "//ui/base",
    "//url",
  ]
}

source_set("constants") {
  sources = [
    "price_notifications_constants.h",
    "price_notifications_constants.mm",
  ]

  frameworks = [ "UIKit.framework" ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "price_notifications_price_tracking_mediator_unittest.mm",
    "price_notifications_table_view_controller_unittest.mm",
  ]
  deps = [
    ":price_notifications",
    ":price_notifications_ui",
    ":test_support",
    "//base",
    "//components/commerce/core:shopping_service_test_support",
    "//components/image_fetcher/core",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/bookmarks/model",
    "//ios/chrome/browser/commerce/model:shopping_service",
    "//ios/chrome/browser/price_insights/coordinator:test_support",
    "//ios/chrome/browser/price_insights/ui:price_insights_ui",
    "//ios/chrome/browser/push_notification/model:push_notification_service_header",
    "//ios/chrome/browser/shared/model/browser",
    "//ios/chrome/browser/shared/model/browser/test:test_support",
    "//ios/chrome/browser/shared/model/browser_state",
    "//ios/chrome/browser/shared/model/profile",
    "//ios/chrome/browser/shared/model/profile/test",
    "//ios/chrome/browser/shared/model/web_state_list",
    "//ios/chrome/browser/shared/public/commands",
    "//ios/chrome/browser/shared/ui/table_view:test_support",
    "//ios/chrome/browser/shared/ui/table_view:utils",
    "//ios/chrome/browser/shared/ui/table_view/cells",
    "//ios/chrome/browser/ui/price_notifications/cells",
    "//ios/chrome/test:test_support",
    "//ios/public/provider/chrome/browser/push_notification:push_notification_api",
    "//ios/testing:block_swizzler",
    "//ios/web/public/test",
    "//ios/web/public/test/fakes",
    "//testing/gtest",
    "//third_party/ocmock",
    "//ui/base",
  ]
}

source_set("test_support") {
  sources = [
    "test_price_notifications_consumer.h",
    "test_price_notifications_consumer.mm",
    "test_price_notifications_mutator.h",
    "test_price_notifications_mutator.mm",
  ]

  deps = [
    ":price_notifications_ui",
    "//base",
  ]
}

source_set("eg2_tests") {
  configs += [ "//build/config/ios:xctest_config" ]
  testonly = true
  sources = [ "price_notifications_price_tracking_egtest.mm" ]
  deps = [
    ":constants",
    "//base",
    "//base/test:test_support",
    "//components/commerce/core:feature_list",
    "//components/strings",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/shared/ui/table_view:constants",
    "//ios/chrome/browser/signin/model:fake_system_identity",
    "//ios/chrome/browser/ui/authentication:eg_test_support+eg2",
    "//ios/chrome/test/earl_grey:eg_test_support+eg2",
    "//ios/testing/earl_grey:eg_test_support+eg2",
    "//ui/base",
  ]
  frameworks = [ "UIKit.framework" ]
}