Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Unified Diff: components/storage_monitor/BUILD.gn

Issue 1311623002: Add more components_unittests to GN build (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/search_provider_logos/BUILD.gn ('k') | components/sync_driver/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/storage_monitor/BUILD.gn
diff --git a/components/storage_monitor/BUILD.gn b/components/storage_monitor/BUILD.gn
index 48b34d04380cc64a170779da19209ded505d3106..ccb33cea904163e1565fd1b5a57c507d1143e315 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",
+ ]
+ }
+}
« no previous file with comments | « components/search_provider_logos/BUILD.gn ('k') | components/sync_driver/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698