chromium/chromeos/ash/components/standalone_browser/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("//build/config/chromeos/ui_mode.gni")

assert(is_chromeos_ash,
       "Non-Chrome-OS builds must not depend on //chromeos/ash")

component("standalone_browser") {
  defines = [ "IS_CHROMEOS_ASH_COMPONENTS_STANDALONE_BROWSER_IMPL" ]

  sources = [
    "browser_support.cc",
    "browser_support.h",
    "channel_util.cc",
    "channel_util.h",
    "lacros_availability.cc",
    "lacros_availability.h",
    "lacros_selection.cc",
    "lacros_selection.h",
    "migration_progress_tracker.cc",
    "migration_progress_tracker.h",
    "migrator_util.cc",
    "migrator_util.h",
    "standalone_browser_features.cc",
    "standalone_browser_features.h",
  ]

  deps = [
    "//ash/constants:constants",
    "//base",
    "//base/version_info",
    "//chromeos/ash/components/channel",
    "//components/account_id",
    "//components/component_updater",
    "//components/policy:generated",
    "//components/policy/core/common",
    "//components/prefs",
    "//components/user_manager:user_manager",
    "//google_apis:google_apis",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "channel_util_unittest.cc",
    "lacros_availability_unittest.cc",
    "lacros_selection_unittest.cc",
    "migrator_util_unittest.cc",
    "test_util_unittest.cc",
  ]

  deps = [
    ":standalone_browser",
    ":test_support",
    "//ash/constants:constants",
    "//base/test:test_support",
    "//components/account_id",
    "//components/policy:generated",
    "//components/policy/core/common",
    "//components/prefs:test_support",
    "//components/user_manager:test_support",
    "//content/test:test_support",
    "//testing/gtest:gtest",
  ]
}

source_set("test_support") {
  testonly = true

  sources = [
    "fake_migration_progress_tracker.h",
    "feature_refs.cc",
    "test_util.cc",
    "test_util.h",
  ]

  deps = [
    ":standalone_browser",
    "//ash/constants",
    "//base/test:test_support",
  ]
}