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

source_set("features") {
  configs += [ "//components/enterprise:extra_warnings" ]

  sources = [ "device_trust_features.cc" ]

  public = [ "device_trust_features.h" ]

  public_deps = [ "//base" ]
}

source_set("unit_tests") {
  testonly = true

  # Some of these tests declare file-scope objects with non-trivial
  # destructors.
  configs += [ "//build/config/compiler:no_exit_time_destructors" ]

  sources = []
  deps = []

  if (is_linux || is_chromeos || is_mac || is_win) {
    sources += [
      "device_trust_connector_service_factory_unittest.cc",
      "navigation_throttle_unittest.cc",
    ]
    deps += [
      "//base",
      "//chrome/browser/enterprise:impl",
      "//chrome/browser/enterprise/connectors/device_trust/signals:test_support",
      "//chrome/browser/ui/views/device_signals_consent",
      "//chrome/test:test_support",
      "//components/device_signals/core/browser:test_support",
      "//components/enterprise/device_trust/core:device_trust_connector_service",
      "//components/enterprise/device_trust/core:device_trust_service",
      "//components/enterprise/device_trust/core:metrics",
      "//components/enterprise/device_trust/core:test_support",
      "//components/enterprise/device_trust/core/attestation:test_support",
      "//testing/gmock",
      "//testing/gtest",
    ]
  }
}
