# Copyright 2019 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")
import("//testing/test.gni")
assert(is_chromeos_ash, "Non-Chrome-OS builds must not depend on //ash")
component("disks") {
defines = [ "IS_CHROMEOS_ASH_COMPONENTS_DISKS_IMPL" ]
deps = [
"//ash/constants",
"//base",
"//chromeos/ash/components/dbus",
"//chromeos/ash/components/dbus/cros_disks",
"//chromeos/dbus/power",
"//chromeos/dbus/power:power_manager_proto",
]
sources = [
"disk.cc",
"disk.h",
"disk_mount_manager.cc",
"disk_mount_manager.h",
"mount_point.cc",
"mount_point.h",
"suspend_unmount_manager.cc",
"suspend_unmount_manager.h",
]
}
source_set("test_support") {
testonly = true
public_deps = [ ":disks" ]
deps = [
"//base",
"//base/test:test_support",
"//chromeos/ash/components/dbus:test_support",
"//chromeos/ash/components/dbus/cros_disks",
"//chromeos/dbus/power:power_manager_proto",
"//testing/gmock",
"//testing/gtest",
]
sources = [
"fake_disk_mount_manager.cc",
"fake_disk_mount_manager.h",
"mock_disk_mount_manager.cc",
"mock_disk_mount_manager.h",
]
}
source_set("unit_tests") {
testonly = true
deps = [
":disks",
":test_support",
"//base/test:test_support",
"//chromeos/ash/components/dbus:test_support",
"//chromeos/ash/components/dbus/cros_disks",
"//chromeos/dbus/power",
"//chromeos/dbus/power:power_manager_proto",
"//testing/gmock",
"//testing/gtest",
]
sources = [
"disk_mount_manager_unittest.cc",
"disk_unittest.cc",
"mount_point_unittest.cc",
"suspend_unmount_manager_unittest.cc",
]
}