chromium/components/headless/test/BUILD.gn

# Copyright 2023 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//pdf/features.gni")
import("//printing/buildflags/buildflags.gni")

source_set("test") {
  sources = [
    "bitmap_utils.cc",
    "bitmap_utils.h",
    "capture_std_stream.cc",
    "capture_std_stream.h",
  ]

  if (enable_printing && enable_pdf) {
    sources += [
      "pdf_utils.cc",
      "pdf_utils.h",
    ]
  }

  deps = [
    "//base",
    "//pdf:buildflags",
    "//printing/buildflags",
  ]

  public_deps = [
    "//skia",
    "//ui/gfx",
  ]

  if (enable_printing) {
    deps += [ "//printing" ]

    if (enable_pdf) {
      deps += [ "//pdf" ]
    }
  }
}

source_set("unit_tests") {
  testonly = true
  sources = [ "bitmap_utils_unittest.cc" ]

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