chromium/components/search_provider_logos/BUILD.gn

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

static_library("search_provider_logos") {
  sources = [
    "fixed_logo_api.cc",
    "fixed_logo_api.h",
    "google_logo_api.cc",
    "google_logo_api.h",
    "logo_cache.cc",
    "logo_cache.h",
    "logo_common.cc",
    "logo_common.h",
    "logo_observer.h",
    "logo_service.cc",
    "logo_service.h",
    "logo_service_impl.cc",
    "logo_service_impl.h",
  ]

  public_deps = [
    ":switches",
    "//base",
    "//skia",
  ]

  deps = [
    "//components/image_fetcher/core",
    "//components/keyed_service/core",
    "//components/search_engines",
    "//components/signin/public/identity_manager",
    "//net",
    "//services/network/public/cpp",
    "//services/network/public/mojom",
    "//ui/gfx",
    "//url",
  ]
}

static_library("switches") {
  sources = [
    "switches.cc",
    "switches.h",
  ]
}

bundle_data("unit_tests_bundle_data") {
  visibility = [ ":unit_tests" ]
  testonly = true
  sources = [
    "//components/test/data/search_provider_logos/ddljson_android0.json",
    "//components/test/data/search_provider_logos/ddljson_android0_fp.json",
    "//components/test/data/search_provider_logos/ddljson_android1.json",
    "//components/test/data/search_provider_logos/ddljson_android1_fp.json",
    "//components/test/data/search_provider_logos/ddljson_android2.json",
    "//components/test/data/search_provider_logos/ddljson_android2_fp.json",
    "//components/test/data/search_provider_logos/ddljson_android3.json",
    "//components/test/data/search_provider_logos/ddljson_android3_fp.json",
    "//components/test/data/search_provider_logos/ddljson_android4.json",
    "//components/test/data/search_provider_logos/ddljson_android4_fp.json",
    "//components/test/data/search_provider_logos/ddljson_desktop0.json",
    "//components/test/data/search_provider_logos/ddljson_desktop0_fp.json",
    "//components/test/data/search_provider_logos/ddljson_desktop1.json",
    "//components/test/data/search_provider_logos/ddljson_desktop1_fp.json",
    "//components/test/data/search_provider_logos/ddljson_desktop2.json",
    "//components/test/data/search_provider_logos/ddljson_desktop2_fp.json",
    "//components/test/data/search_provider_logos/ddljson_desktop3.json",
    "//components/test/data/search_provider_logos/ddljson_desktop3_fp.json",
    "//components/test/data/search_provider_logos/ddljson_desktop4.json",
    "//components/test/data/search_provider_logos/ddljson_desktop4_fp.json",
    "//components/test/data/search_provider_logos/ddljson_ios0.json",
    "//components/test/data/search_provider_logos/ddljson_ios0_fp.json",
    "//components/test/data/search_provider_logos/ddljson_ios1.json",
    "//components/test/data/search_provider_logos/ddljson_ios1_fp.json",
    "//components/test/data/search_provider_logos/ddljson_ios2.json",
    "//components/test/data/search_provider_logos/ddljson_ios2_fp.json",
    "//components/test/data/search_provider_logos/ddljson_ios3.json",
    "//components/test/data/search_provider_logos/ddljson_ios3_fp.json",
    "//components/test/data/search_provider_logos/ddljson_ios4.json",
    "//components/test/data/search_provider_logos/ddljson_ios4_fp.json",
  ]
  outputs = [ "{{bundle_resources_dir}}/" +
              "{{source_root_relative_dir}}/{{source_file_part}}" ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "google_logo_api_unittest.cc",
    "logo_cache_unittest.cc",
    "logo_service_impl_unittest.cc",
  ]
  deps = [
    ":search_provider_logos",
    ":unit_tests_bundle_data",
    "//base/test:test_support",
    "//components/image_fetcher/core",
    "//components/search_engines",
    "//components/search_engines:test_support",
    "//components/signin/public/base:test_support",
    "//components/signin/public/identity_manager:test_support",
    "//components/sync_preferences:test_support",
    "//net:test_support",
    "//services/network:test_support",
    "//testing/gmock",
    "//testing/gtest",
    "//ui/gfx",
  ]
}