# Copyright 2016 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.

source_set("infobars") {
  configs += [ "//build/config/compiler:enable_arc" ]
  sources = [
    "confirm_infobar_view.h",
    "confirm_infobar_view.mm",
    "infobar_constants.h",
    "infobar_constants.mm",
    "infobar_view_sizing.h",
    "infobar_view_sizing_delegate.h",
  ]
  deps = [
    "resources:infobar_close",
    "resources:infobar_downloading",
    "resources:infobar_popup_blocker",
    "resources:infobar_shadow",
    "resources:infobar_warning",
    "//base",
    "//base:i18n",
    "//components/strings",
    "//ios/chrome/app/theme:theme",
    "//ios/chrome/app/theme:theme_grit",
    "//ios/chrome/browser/ui",
    "//ios/chrome/browser/ui/colors",
    "//ios/chrome/browser/ui/fancy_ui",
    "//ios/chrome/browser/ui/util",
    "//ios/public/provider/chrome/browser/ui",
    "//ios/third_party/material_components_ios",
    "//ui/base",
    "//ui/gfx",
    "//url",
  ]
  libs = [
    "CoreGraphics.framework",
    "QuartzCore.framework",
    "UIKit.framework",
  ]
}

source_set("unit_tests") {
  configs += [ "//build/config/compiler:enable_arc" ]
  testonly = true
  sources = [
    "confirm_infobar_view_unittest.mm",
  ]
  deps = [
    ":infobars",
    "//testing/gtest",
  ]
}

source_set("test_support") {
  configs += [ "//build/config/compiler:enable_arc" ]
  testonly = true
  sources = [
    "test_infobar_delegate.h",
    "test_infobar_delegate.mm",
  ]
  deps = [
    "//base",
    "//components/infobars/core",
  ]
}

source_set("eg_tests") {
  configs += [ "//build/config/compiler:enable_arc" ]
  testonly = true
  sources = [
    "infobar_egtest.mm",
  ]
  deps = [
    ":test_support",
    "//base",
    "//components/infobars/core",
    "//ios/chrome/app:app_internal",
    "//ios/chrome/browser/infobars",
    "//ios/chrome/browser/tabs",
    "//ios/chrome/test/app:test_support",
    "//ios/chrome/test/earl_grey:test_support",
    "//ios/third_party/earl_grey:earl_grey+link",
    "//ios/web/public/test/http_server",
    "//url",
  ]
  libs = [ "XCTest.framework" ]
}
