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

import("//ui/base/ui_features.gni")

source_set("unit_tests") {
  testonly = true

  sources = []
  deps = []

  if (is_linux || is_mac || is_win) {
    sources += [ "rotate_attestation_credential_job_unittest.cc" ]
    deps += [
      "//base",
      "//chrome/browser/enterprise:impl",
      "//chrome/browser/enterprise/connectors/device_trust:features",
      "//chrome/browser/enterprise/connectors/device_trust/key_management/browser:test_support",
      "//chrome/test:test_support",
      "//testing/gtest",
    ]
  }

  if (toolkit_views && !is_chromeos) {
    sources += [
      "clear_browsing_data_job_unittest.cc",
      "user_remote_commands_factory_unittest.cc",
    ]
    deps += [
      "//base",
      "//chrome/browser/enterprise:impl",
      "//chrome/test:test_support",
      "//testing/gtest",
    ]
  }
}

if (!is_chromeos) {
  source_set("platform_browser_tests") {
    testonly = true
    defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]

    sources = [ "user_remote_commands_service_browsertest.cc" ]

    deps = [
      "//base",
      "//chrome/browser/enterprise:impl",
      "//chrome/browser/invalidation",
      "//chrome/browser/policy:test_support",
      "//chrome/test:test_support",
      "//components/invalidation:test_support",
      "//components/policy/test_support",
      "//content/test:test_support",
      "//testing/gmock",
    ]
  }
}
