chromium/chrome/browser/apps/almanac_api_client/BUILD.gn

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

import("//build/config/chromeos/ui_mode.gni")

assert(is_chromeos_ash)

source_set("almanac_api_client") {
  sources = [
    "almanac_api_util.cc",
    "almanac_api_util.h",
    "almanac_app_icon_loader.cc",
    "almanac_app_icon_loader.h",
    "almanac_icon_cache.cc",
    "almanac_icon_cache.h",
    "device_info_manager.cc",
    "device_info_manager.h",
    "proto_file_manager.cc",
    "proto_file_manager.h",
  ]

  deps = [
    "//ash/constants",
    "//base",
    "//chrome/browser:browser_process",
    "//chrome/browser/apps:user_type_filter",
    "//chrome/browser/apps/almanac_api_client/proto",
    "//chrome/browser/apps/app_service/app_icon",
    "//chrome/browser/ash/arc",
    "//chrome/browser/ash/borealis",
    "//chrome/browser/image_fetcher",
    "//chrome/browser/profiles",
    "//chrome/browser/profiles:profile",
    "//chrome/common:channel_info",
    "//chromeos/ash/components/system",
    "//chromeos/version",
    "//components/image_fetcher/core",
    "//components/language/core/browser",
    "//components/prefs",
    "//components/version_info",
    "//content/public/browser",
    "//google_apis",
    "//google_apis/common:request_util",
    "//services/network/public/cpp",
    "//services/network/public/mojom",
  ]
}

source_set("test_support") {
  testonly = true
  sources = [
    "mock_almanac_icon_cache.cc",
    "mock_almanac_icon_cache.h",
  ]
  deps = [
    ":almanac_api_client",
    "//base",
    "//testing/gmock",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "almanac_api_util_unittest.cc",
    "almanac_icon_cache_unittest.cc",
    "device_info_manager_unittest.cc",
    "proto_file_manager_unittest.cc",
  ]

  deps = [
    ":almanac_api_client",
    "//base",
    "//chrome/browser/apps/almanac_api_client/proto",
    "//chrome/common:channel_info",
    "//chrome/test:test_support",
    "//chromeos/ash/components/system",
    "//components/image_fetcher/core",
    "//components/image_fetcher/core:test_support",
    "//components/language/core/browser",
    "//components/prefs",
    "//testing/gtest",
  ]
}

source_set("browser_tests") {
  testonly = true

  sources = [ "almanac_app_icon_loader_browsertest.cc" ]

  defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]

  deps = [
    ":almanac_api_client",
    "//base",
    "//chrome/test:test_support",
    "//content/test:test_support",
  ]
}