chromium/ash/webui/personalization_app/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.

import("//build/config/chromeos/ui_mode.gni")
import("//chrome/test/base/ash/js2gtest.gni")

assert(is_chromeos_ash, "Personalization App is ash-chrome only")

static_library("personalization_app") {
  sources = [
    "personalization_app_ambient_provider.h",
    "personalization_app_keyboard_backlight_provider.h",
    "personalization_app_theme_provider.h",
    "personalization_app_ui.cc",
    "personalization_app_ui.h",
    "personalization_app_url_constants.cc",
    "personalization_app_url_constants.h",
    "personalization_app_user_provider.h",
    "personalization_app_wallpaper_provider.h",
    "search/search_concept.h",
    "search/search_handler.cc",
    "search/search_handler.h",
    "search/search_tag_registry.cc",
    "search/search_tag_registry.h",
  ]

  deps = [
    "search:mojo_bindings",
    "//ash",
    "//ash/constants:constants",
    "//ash/public/cpp",
    "//ash/webui/common:sea_pen",
    "//ash/webui/common:trusted_types_util",
    "//ash/webui/common/mojom:sea_pen",
    "//ash/webui/personalization_app/mojom",
    "//ash/webui/personalization_app/proto",
    "//ash/webui/personalization_app/resources:resources",
    "//ash/webui/system_apps/public:system_web_app_config",
    "//ash/webui/system_apps/public:system_web_app_type",
    "//chromeos/ash/components/local_search_service",
    "//chromeos/ash/components/local_search_service/public/cpp",
    "//chromeos/ash/components/local_search_service/public/mojom",
    "//chromeos/crosapi/cpp:cpp",
    "//chromeos/strings",
    "//components/keyed_service/content",
    "//components/keyed_service/core",
    "//components/manta",
    "//content/public/browser",
    "//ui/chromeos",
    "//ui/chromeos/styles:cros_styles_views",
    "//ui/resources:webui_resources_grd_grit",
    "//ui/webui",
  ]
}

source_set("test_support") {
  testonly = true
  sources = [
    "test/fake_personalization_app_ambient_provider.cc",
    "test/fake_personalization_app_ambient_provider.h",
    "test/fake_personalization_app_keyboard_backlight_provider.cc",
    "test/fake_personalization_app_keyboard_backlight_provider.h",
    "test/fake_personalization_app_user_provider.cc",
    "test/fake_personalization_app_user_provider.h",
    "test/personalization_app_mojom_banned_mocha_test_base.cc",
    "test/personalization_app_mojom_banned_mocha_test_base.h",
  ]

  defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]

  deps = [
    ":personalization_app",
    "//ash/public/cpp",
    "//ash/webui/common:sea_pen",
    "//ash/webui/common/mojom:sea_pen",
    "//ash/webui/personalization_app/mojom",
    "//ash/webui/personalization_app/proto",
    "//chrome/test:test_support_ui",
  ]

  data = []
}

source_set("unit_tests") {
  testonly = true
  sources = [ "search/search_handler_unittest.cc" ]
  deps = [
    ":personalization_app",
    "//ash:test_support",
    "//ash/constants",
    "//ash/public/cpp",
    "//ash/public/cpp:test_support",
    "//ash/webui/personalization_app/search:mojo_bindings",
    "//base/test:test_support",
    "//chromeos/ash/components:test_support",
    "//chromeos/ash/components/local_search_service/public/cpp",
    "//chromeos/ash/components/local_search_service/public/mojom",
    "//chromeos/strings:strings_grit",
    "//components/prefs:test_support",
    "//mojo/public/cpp/bindings:bindings",
    "//testing/gtest",
    "//ui/base:base",
  ]
}