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

Side by Side Diff: services/device/BUILD.gn

Issue 2814013002: Reland - [DeviceService] Add service tests for VibrationManager. (Closed)
Patch Set: Fix android_n5x_swarming_rel bot Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « services/BUILD.gn ('k') | services/device/device_service_test_base.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/features.gni") 5 import("//build/config/features.gni")
6 import("//services/catalog/public/tools/catalog.gni")
6 import("//services/service_manager/public/cpp/service.gni") 7 import("//services/service_manager/public/cpp/service.gni")
7 import("//services/service_manager/public/service_manifest.gni") 8 import("//services/service_manager/public/service_manifest.gni")
8 9
9 if (is_android) { 10 if (is_android) {
10 import("//build/config/android/rules.gni") 11 import("//build/config/android/rules.gni")
11 } 12 }
12 13
13 source_set("lib") { 14 source_set("lib") {
14 # This should be visible only to embedders of the Device Service, and the 15 # This should be visible only to embedders of the Device Service, and the
15 # dependence should only be for the purpose of embedding the Device Service. 16 # dependence should only be for the purpose of embedding the Device Service.
16 visibility = [ "//content/browser" ] 17 visibility = [
18 ":test_support",
19 "//content/browser",
20 ]
17 sources = [ 21 sources = [
18 "device_service.cc", 22 "device_service.cc",
19 "device_service.h", 23 "device_service.h",
20 ] 24 ]
21 25
22 deps = [ 26 deps = [
23 "//base", 27 "//base",
24 "//device/battery:mojo_bindings", 28 "//device/battery:mojo_bindings",
25 "//device/sensors", 29 "//device/sensors",
30 "//device/sensors/public/interfaces",
26 "//device/vibration:mojo_bindings", 31 "//device/vibration:mojo_bindings",
27 "//device/wake_lock", 32 "//device/wake_lock",
28 "//services/device/fingerprint", 33 "//services/device/fingerprint",
29 "//services/device/power_monitor", 34 "//services/device/power_monitor",
30 "//services/device/screen_orientation", 35 "//services/device/screen_orientation",
31 "//services/device/time_zone_monitor", 36 "//services/device/time_zone_monitor",
32 "//services/service_manager/public/cpp", 37 "//services/service_manager/public/cpp",
33 "//ui/gfx", 38 "//ui/gfx",
34 ] 39 ]
35 40
(...skipping 10 matching lines...) Expand all
46 ] 51 ]
47 } 52 }
48 } 53 }
49 54
50 source_set("tests") { 55 source_set("tests") {
51 testonly = true 56 testonly = true
52 57
53 sources = [ 58 sources = [
54 "power_monitor/power_monitor_message_broadcaster_unittest.cc", 59 "power_monitor/power_monitor_message_broadcaster_unittest.cc",
55 "public/cpp/power_monitor/power_monitor_broadcast_source_unittest.cc", 60 "public/cpp/power_monitor/power_monitor_broadcast_source_unittest.cc",
61 "vibration/vibration_manager_impl_unittest.cc",
56 ] 62 ]
57 63
58 deps = [ 64 deps = [
65 ":test_support",
59 "//base", 66 "//base",
60 "//base/test:test_support", 67 "//base/test:test_support",
68 "//device/vibration:mojo_bindings",
61 "//mojo/public/cpp/bindings", 69 "//mojo/public/cpp/bindings",
62 "//services/device/power_monitor", 70 "//services/device/power_monitor",
63 "//services/device/public/cpp/power_monitor", 71 "//services/device/public/cpp/power_monitor",
64 "//testing/gtest", 72 "//testing/gtest",
65 ] 73 ]
66 74
67 if (is_chromeos) { 75 if (is_chromeos) {
68 sources += [ "fingerprint/fingerprint_chromeos_unittest.cc" ] 76 sources += [ "fingerprint/fingerprint_chromeos_unittest.cc" ]
69 deps += [ "//services/device/fingerprint" ] 77 deps += [ "//services/device/fingerprint" ]
70 } 78 }
71 79
72 if (is_android) { 80 if (is_android) {
73 deps += [ ":device_service_jni_headers" ] 81 deps += [
82 ":device_service_jni_headers",
83 "//device/vibration/android:vibration_jni_headers",
84 ]
74 } else { 85 } else {
75 deps += [ "//device/battery" ] 86 deps += [
87 "//device/battery",
88 "//device/vibration",
89 ]
76 } 90 }
77 } 91 }
78 92
79 service_manifest("manifest") { 93 service_manifest("manifest") {
80 name = "device" 94 name = "device"
81 source = "manifest.json" 95 source = "manifest.json"
82 } 96 }
83 97
98 service_manifest("unittest_manifest") {
99 name = "device_unittests"
100 source = "unittest_manifest.json"
101 packaged_services = [ ":manifest" ]
102 }
103
104 catalog("tests_catalog") {
105 testonly = true
106 embedded_services = [ ":unittest_manifest" ]
107 }
108
109 source_set("test_support") {
110 testonly = true
111
112 sources = [
113 "device_service_test_base.cc",
114 "device_service_test_base.h",
115 ]
116
117 deps = [
118 ":lib",
119 "//base",
120 "//base/test:test_support",
121 "//mojo/public/cpp/bindings",
122 "//services/device/public/interfaces:constants",
123 "//services/service_manager/public/cpp:service_test_support",
124 "//services/service_manager/public/cpp:sources",
125 ]
126 }
127
84 if (is_android) { 128 if (is_android) {
85 generate_jni("device_service_jni_headers") { 129 generate_jni("device_service_jni_headers") {
86 sources = [ 130 sources = [
87 "android/java/src/org/chromium/services/device/InterfaceRegistrar.java", 131 "android/java/src/org/chromium/services/device/InterfaceRegistrar.java",
88 ] 132 ]
89 jni_package = "device_service" 133 jni_package = "device_service"
90 } 134 }
91 135
92 android_library("java") { 136 android_library("java") {
93 # This should be visible only to embedders of the Device Service, and the 137 # This should be visible only to embedders of the Device Service, and the
94 # dependence should only be for the purpose of embedding the Device Service. 138 # dependence should only be for the purpose of embedding the Device Service.
95 # //content/public/android:* here actually wants to identify the 139 # //content/public/android:* here actually wants to identify the
96 # //content/public/android:content_java target and all of its generated 140 # //content/public/android:content_java target and all of its generated
97 # targets which also need to see this target as well. 141 # targets which also need to see this target as well.
98 visibility = [ "//content/public/android:*" ] 142 # //services:* identifies //services:service_unittests and all of its
143 # generated targets.
144 visibility = [
145 "//content/public/android:*",
146 "//services:*",
147 ]
99 java_files = [ "android/java/src/org/chromium/services/device/InterfaceRegis trar.java" ] 148 java_files = [ "android/java/src/org/chromium/services/device/InterfaceRegis trar.java" ]
100 deps = [ 149 deps = [
101 "//base:base_java", 150 "//base:base_java",
102 "//device/battery:mojo_bindings_java", 151 "//device/battery:mojo_bindings_java",
103 "//device/battery/android:battery_monitor_java", 152 "//device/battery/android:battery_monitor_java",
104 "//device/vibration:mojo_bindings_java", 153 "//device/vibration:mojo_bindings_java",
105 "//device/vibration/android:vibration_manager_java", 154 "//device/vibration/android:vibration_manager_java",
106 "//mojo/android:system_java", 155 "//mojo/android:system_java",
107 "//mojo/public/java:bindings_java", 156 "//mojo/public/java:bindings_java",
108 "//mojo/public/java:system_java", 157 "//mojo/public/java:system_java",
109 "//services/device/screen_orientation:java", 158 "//services/device/screen_orientation:java",
110 "//services/device/time_zone_monitor:java", 159 "//services/device/time_zone_monitor:java",
111 "//services/service_manager/public/interfaces:interfaces_java", 160 "//services/service_manager/public/interfaces:interfaces_java",
112 "//services/service_manager/public/java:service_manager_java", 161 "//services/service_manager/public/java:service_manager_java",
113 ] 162 ]
114 } 163 }
115 } 164 }
OLDNEW
« no previous file with comments | « services/BUILD.gn ('k') | services/device/device_service_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698