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

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

Issue 2774783003: [DeviceService] Add service tests for VibrationManager. (Closed)
Patch Set: Address comments from blundell@ 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 ]
85 public_deps = [
86 "//services/device:java",
87 ]
74 } else { 88 } else {
75 deps += [ "//device/battery" ] 89 deps += [
90 "//device/battery",
91 "//device/vibration",
92 ]
76 } 93 }
77 } 94 }
78 95
79 service_manifest("manifest") { 96 service_manifest("manifest") {
80 name = "device" 97 name = "device"
81 source = "manifest.json" 98 source = "manifest.json"
82 } 99 }
83 100
101 service_manifest("unittest_manifest") {
102 name = "device_unittests"
103 source = "unittest_manifest.json"
104 packaged_services = [ ":manifest" ]
105 }
106
107 catalog("tests_catalog") {
108 testonly = true
109 embedded_services = [ ":unittest_manifest" ]
110 }
111
112 source_set("test_support") {
113 testonly = true
114
115 sources = [
116 "device_service_test_base.cc",
117 "device_service_test_base.h",
118 ]
119
120 deps = [
121 ":lib",
122 "//base",
123 "//base/test:test_support",
124 "//mojo/public/cpp/bindings",
125 "//services/device/public/interfaces:constants",
126 "//services/service_manager/public/cpp:service_test_support",
127 "//services/service_manager/public/cpp:sources",
128 ]
129 }
130
84 if (is_android) { 131 if (is_android) {
85 generate_jni("device_service_jni_headers") { 132 generate_jni("device_service_jni_headers") {
86 sources = [ 133 sources = [
87 "android/java/src/org/chromium/services/device/InterfaceRegistrar.java", 134 "android/java/src/org/chromium/services/device/InterfaceRegistrar.java",
88 ] 135 ]
89 jni_package = "device_service" 136 jni_package = "device_service"
90 } 137 }
91 138
92 android_library("java") { 139 android_library("java") {
93 # This should be visible only to embedders of the Device Service, and the 140 # 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. 141 # dependence should only be for the purpose of embedding the Device Service.
95 # //content/public/android:* here actually wants to identify the 142 # //content/public/android:* here actually wants to identify the
96 # //content/public/android:content_java target and all of its generated 143 # //content/public/android:content_java target and all of its generated
97 # targets which also need to see this target as well. 144 # targets which also need to see this target as well.
98 visibility = [ "//content/public/android:*" ] 145 visibility = [
146 ":tests",
147 "//content/public/android:*",
148 ]
99 java_files = [ "android/java/src/org/chromium/services/device/InterfaceRegis trar.java" ] 149 java_files = [ "android/java/src/org/chromium/services/device/InterfaceRegis trar.java" ]
100 deps = [ 150 deps = [
101 "//base:base_java", 151 "//base:base_java",
102 "//device/battery:mojo_bindings_java", 152 "//device/battery:mojo_bindings_java",
103 "//device/battery/android:battery_monitor_java", 153 "//device/battery/android:battery_monitor_java",
104 "//device/vibration:mojo_bindings_java", 154 "//device/vibration:mojo_bindings_java",
105 "//device/vibration/android:vibration_manager_java", 155 "//device/vibration/android:vibration_manager_java",
106 "//mojo/android:system_java", 156 "//mojo/android:system_java",
107 "//mojo/public/java:bindings_java", 157 "//mojo/public/java:bindings_java",
108 "//mojo/public/java:system_java", 158 "//mojo/public/java:system_java",
109 "//services/device/screen_orientation:java", 159 "//services/device/screen_orientation:java",
110 "//services/device/time_zone_monitor:java", 160 "//services/device/time_zone_monitor:java",
111 "//services/service_manager/public/interfaces:interfaces_java", 161 "//services/service_manager/public/interfaces:interfaces_java",
112 "//services/service_manager/public/java:service_manager_java", 162 "//services/service_manager/public/java:service_manager_java",
113 ] 163 ]
114 } 164 }
115 } 165 }
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