chromium/chrome/browser/ui/ash/clipboard/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)

static_library("clipboard") {
  sources = [
    "clipboard_history_controller_delegate_impl.cc",
    "clipboard_history_controller_delegate_impl.h",
    "clipboard_history_url_title_fetcher_impl.cc",
    "clipboard_history_url_title_fetcher_impl.h",
    "clipboard_image_model_factory_impl.cc",
    "clipboard_image_model_factory_impl.h",
    "clipboard_image_model_request.cc",
    "clipboard_image_model_request.h",
    "clipboard_util.cc",
    "clipboard_util.h",
  ]

  public_deps = [
    "//ash",
    "//ash/public/cpp",
    "//base",
    "//content/public/browser",
    "//ui/base",
    "//ui/base/clipboard",
  ]

  deps = [
    "//ash/constants",
    "//chrome/browser:browser_process",
    "//chrome/browser:browser_public_dependencies",
    "//chrome/browser/profiles:profile",
    "//chromeos/ash/components/browser_context_helper",
    "//components/history/core/browser",
    "//components/user_manager",
    "//services/data_decoder/public/cpp",
    "//ui/aura",
    "//ui/base/clipboard:clipboard_types",
    "//ui/base/data_transfer_policy",
    "//ui/gfx",
    "//ui/views",
    "//ui/views/controls/webview",
    "//url",
  ]
}

static_library("test_support") {
  testonly = true

  sources = [
    "clipboard_history_test_util.cc",
    "clipboard_history_test_util.h",
  ]

  public_deps = [
    ":clipboard",
    "//ash/public/cpp",
    "//base",
  ]

  deps = [ "//testing/gtest" ]
}

if (!is_chromeos_device) {
  source_set("interactive_ui_tests") {
    testonly = true

    defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]

    sources = [ "clipboard_history_interactive_uitest.cc" ]

    deps = [
      ":clipboard",
      ":test_support",
      "//ash",
      "//base",
      "//chrome/browser/ui",
      "//chrome/test:test_support_ui",
      "//content/test:test_support",
      "//net:test_support",
      "//ui/events:test_support",
    ]
  }
}

source_set("browser_tests") {
  testonly = true

  defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]

  sources = [ "clipboard_history_browsertest.cc" ]

  deps = [
    ":test_support",
    "//ash",
    "//ash:test_support",
    "//ash/constants",
    "//ash/public/cpp",
    "//base",
    "//base/test:test_support",
    "//chrome/app:command_ids",
    "//chrome/app:generated_resources",
    "//chrome/browser",
    "//chrome/browser/ash/login:test_support",
    "//chrome/browser/ash/login/test:test_support",
    "//chrome/browser/ash/login/ui",
    "//chrome/browser/ash/profiles",
    "//chrome/browser/profiles:profile",
    "//chrome/browser/ui",
    "//chrome/test:test_support",
    "//chrome/test:test_support_ui",
    "//chromeos/ash/components/browser_context_helper",
    "//chromeos/ash/components/dbus/session_manager",
    "//chromeos/constants",
    "//components/user_manager",
    "//content/public/browser",
    "//content/test:test_support",
    "//third_party/abseil-cpp:absl",
    "//ui/base",
    "//ui/base/clipboard",
    "//ui/base/clipboard:clipboard_types",
    "//ui/base/data_transfer_policy",
    "//ui/events:event_constants",
    "//ui/events:events_base",
    "//ui/events:test_support",
    "//ui/strings:ui_strings",
    "//ui/views",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [ "clipboard_history_url_title_fetcher_impl_unittest.cc" ]

  deps = [
    ":clipboard",
    "//base",
    "//base/test:test_support",
    "//chrome/browser",
    "//chrome/browser/ash/profiles",
    "//chrome/test:test_support",
    "//components/history/core/browser",
    "//testing/gmock",
    "//testing/gtest",
  ]
}