chromium/ash/webui/diagnostics_ui/BUILD.gn

# Copyright 2020 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("//testing/test.gni")

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

static_library("diagnostics_ui") {
  sources = [
    "diagnostics_metrics.cc",
    "diagnostics_metrics.h",
    "diagnostics_metrics_message_handler.cc",
    "diagnostics_metrics_message_handler.h",
    "diagnostics_ui.cc",
    "diagnostics_ui.h",
  ]

  public_deps = [ ":url_constants" ]

  deps = [
    "//ash/constants",
    "//ash/webui/common:chrome_os_webui_config",
    "//ash/webui/common:keyboard_diagram_strings",
    "//ash/webui/common:trusted_types_util",
    "//ash/webui/common/backend",
    "//ash/webui/diagnostics_ui/backend",
    "//ash/webui/diagnostics_ui/mojom",
    "//ash/webui/diagnostics_ui/resources:resources",
    "//chromeos/ash/components/feature_usage",
    "//chromeos/ash/components/login/login_state",
    "//chromeos/strings/",
    "//content/public/browser",
    "//ui/base",
    "//ui/chromeos/strings:strings_provider",
    "//ui/resources",
    "//ui/web_dialogs",
    "//ui/webui",
  ]
}

# Url constants pulled out to enable depending on production url constants in
# browser tests.
source_set("url_constants") {
  sources = [
    "url_constants.cc",
    "url_constants.h",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "diagnostics_metrics_message_handler_unittest.cc",
    "diagnostics_metrics_unittest.cc",
  ]

  deps = [
    ":diagnostics_ui",
    "//base",
    "//base/test:test_support",
    "//content/test:test_support",
    "//testing/gtest",
  ]
}