chromium/chrome/browser/enterprise/connectors/device_trust/test/BUILD.gn

# Copyright 2022 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")

source_set("test_support") {
  testonly = true

  public = [
    "device_trust_browsertest_base.h",
    "device_trust_management_mixin.h",
    "test_constants.h",
  ]

  sources = [
    "device_trust_browsertest_base.cc",
    "device_trust_management_mixin.cc",
    "test_constants.cc",
  ]

  public_deps = [
    "//chrome/browser/enterprise/connectors/device_trust/common",
    "//chrome/browser/enterprise/connectors/test:test_support",
  ]

  deps = [
    "//chrome/browser/enterprise/connectors/device_trust:features",
    "//chrome/browser/profiles:profile",
    "//components/device_signals/core/browser",
    "//components/policy:policy_code_generate",
    "//components/prefs",
  ]

  if (is_chromeos_ash) {
    deps += [ "//chrome/browser/ash/login/test:test_support" ]
  }

  if (is_win || is_mac || is_linux) {
    public += [ "device_trust_test_environment.h" ]
    sources += [ "device_trust_test_environment.cc" ]

    public_deps += [
      "//base",
      "//chrome/browser/enterprise/connectors/device_trust/key_management/core/network:network",
    ]

    deps += [
      "//chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence",
      "//chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence:test_support",
      "//chrome/browser/enterprise/connectors/device_trust/key_management/installer:elevated_rotation",
    ]
  }

  if (is_win) {
    public += [ "device_trust_test_environment_win.h" ]
    sources += [ "device_trust_test_environment_win.cc" ]

    public_deps += [
      "//base/test:test_support",
      "//chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands:test_support",
      "//chrome/browser/enterprise/connectors/device_trust/key_management/core/network:test_support",
      "//chrome/install_static/test:test_support",
      "//crypto:test_support",
    ]

    deps += [
      "//chrome/browser/enterprise/connectors/device_trust/key_management/core:constants",
      "//chrome/browser/enterprise/connectors/device_trust/key_management/installer/management_service:rotate_util",
      "//chrome/install_static:install_static_util",
      "//chrome/installer/util:constants",
      "//components/policy/proto",
    ]
  }
}