1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104

ash / webui / personalization_app / BUILD.gn [blame]

# 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/strings",
    "//components/keyed_service/content",
    "//components/keyed_service/core",
    "//components/manta",
    "//content/public/browser",
    "//ui/chromeos",
    "//ui/chromeos/styles:cros_styles_views",
    "//ui/webui",
    "//ui/webui/resources:resources_grit",
  ]
}

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",
  ]
}