chromium/ash/webui/print_preview_cros/BUILD.gn

# Copyright 2024 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, "Print Preview CrOS is ash-chrome only")

static_library("print_preview_cros") {
  sources = [
    "print_preview_cros_ui.cc",
    "print_preview_cros_ui.h",
  ]

  deps = [
    ":url_constants",
    "//ash/constants:constants",
    "//ash/webui/common:chrome_os_webui_config",
    "//ash/webui/common:trusted_types_util",
    "//ash/webui/print_preview_cros/backend",
    "//ash/webui/print_preview_cros/mojom",
    "//ash/webui/print_preview_cros/resources:resources",
    "//ash/webui/web_applications",
    "//chromeos/strings/",
    "//content/public/browser",
    "//printing/mojom:mojom",
    "//ui/base",
    "//ui/resources",
    "//ui/web_dialogs:web_dialogs",
    "//ui/webui",
  ]
}

# Separating out constants to be used test support.
source_set("url_constants") {
  sources = [
    "url_constants.cc",
    "url_constants.h",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "backend/destination_provider_unittest.cc",
    "backend/pdf_printer_handler_unittest.cc",
    "backend/print_preview_pdf_store_unittest.cc",
  ]

  deps = [
    ":print_preview_cros",
    "//ash/webui/print_preview_cros/backend",
    "//ash/webui/print_preview_cros/mojom",
    "//base/test:test_support",
  ]
}