summaryrefslogtreecommitdiffstats
path: root/components/storage_monitor/BUILD.gn
diff options
context:
space:
mode:
Diffstat (limited to 'components/storage_monitor/BUILD.gn')
-rw-r--r--components/storage_monitor/BUILD.gn41
1 files changed, 36 insertions, 5 deletions
diff --git a/components/storage_monitor/BUILD.gn b/components/storage_monitor/BUILD.gn
index 48b34d0..ccb33ce 100644
--- a/components/storage_monitor/BUILD.gn
+++ b/components/storage_monitor/BUILD.gn
@@ -5,7 +5,7 @@
import("//build/config/features.gni")
# GYP version: components/storage_monitor.gypi:storage_monitor
-static_library("storage_monitor") {
+source_set("storage_monitor") {
sources = [
"image_capture_device.h",
"image_capture_device.mm",
@@ -85,7 +85,7 @@ static_library("storage_monitor") {
}
# GYP version: components/storage_monitor.gypi:storage_monitor_test_support
-static_library("test_support") {
+source_set("test_support") {
sources = [
"mock_removable_storage_observer.cc",
"mock_removable_storage_observer.h",
@@ -101,16 +101,47 @@ static_library("test_support") {
"test_volume_mount_watcher_win.h",
]
- deps = [
- "//base",
+ public_deps = [
":storage_monitor",
+ "//base",
]
if (is_linux) {
- deps += [
+ deps = [
"//device/media_transfer_protocol",
"//device/media_transfer_protocol:mtp_file_entry_proto",
"//device/media_transfer_protocol:mtp_storage_info_proto",
]
}
}
+
+source_set("unit_tests") {
+ testonly = true
+ sources = [
+ "image_capture_device_manager_unittest.mm",
+ "media_storage_util_unittest.cc",
+ "media_transfer_protocol_device_observer_linux_unittest.cc",
+ "storage_info_unittest.cc",
+ "storage_monitor_mac_unittest.mm",
+ "storage_monitor_unittest.cc",
+ "storage_monitor_win_unittest.cc",
+ ]
+
+ configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
+
+ deps = [
+ ":test_support",
+ "//testing/gtest",
+ ]
+
+ if (is_linux && !is_chromeos) {
+ sources += [ "storage_monitor_linux_unittest.cc" ]
+ }
+ if (is_chromeos) {
+ sources += [ "storage_monitor_chromeos_unittest.cc" ]
+ deps += [
+ "//chromeos:test_support",
+ "//testing/gmock",
+ ]
+ }
+}