blob: f76417ee6b4fdea1522a3ec8e266deba750cf99b [file] [log] [blame]
tfarinacdc7e5d2015-02-23 09:52:241# Copyright 2015 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
Yuta Hijikata57d60812020-10-24 01:00:555import("//build/config/chromeos/ui_mode.gni")
tfarinacdc7e5d2015-02-23 09:52:246import("//build/config/features.gni")
Scott Violetc8240b02018-03-08 22:03:597import("//device/vr/buildflags/buildflags.gni")
tfarinacdc7e5d2015-02-23 09:52:248import("//testing/test.gni")
9
scheib56010cc2015-06-25 01:29:4710if (is_android) {
mcasas649deb52017-04-28 01:55:5211 import("//build/config/android/config.gni")
scheib56010cc2015-06-25 01:29:4712 import("//build/config/android/rules.gni") # For generate_jni().
13}
14
erikchenceb2fff2015-04-27 17:50:5415if (is_mac) {
16 import("//build/config/mac/mac_sdk.gni")
17}
18
Sean McAllister224ef732020-08-04 17:27:5519is_linux_without_udev = (is_linux || is_chromeos) && !use_udev
scheib7a4cf042015-03-31 04:33:4420
tfarinacdc7e5d2015-02-23 09:52:2421test("device_unittests") {
22 sources = [
alexis.menardb39a30822016-09-30 15:14:3923 "base/synchronization/one_writer_seqlock_unittest.cc",
Ryan Hansberry5918b492020-09-15 03:14:0024 "bluetooth/adapter_unittest.cc",
25 "bluetooth/advertisement_unittest.cc",
tfarinacdc7e5d2015-02-23 09:52:2426 "bluetooth/bluetooth_adapter_unittest.cc",
ortuno945c90d2015-09-01 01:47:0827 "bluetooth/bluetooth_advertisement_unittest.cc",
tfarinacdc7e5d2015-02-23 09:52:2428 "bluetooth/bluetooth_device_unittest.cc",
jpawlowskif54d01542015-04-13 22:24:4329 "bluetooth/bluetooth_discovery_filter_unittest.cc",
rkc3fb9aa6d2016-05-03 20:39:4430 "bluetooth/bluetooth_local_gatt_characteristic_unittest.cc",
31 "bluetooth/bluetooth_local_gatt_descriptor_unittest.cc",
rkc907af5d2016-05-10 00:20:0232 "bluetooth/bluetooth_local_gatt_service_unittest.cc",
rkc122239752016-04-20 23:59:0833 "bluetooth/bluetooth_remote_gatt_characteristic_unittest.cc",
34 "bluetooth/bluetooth_remote_gatt_descriptor_unittest.cc",
35 "bluetooth/bluetooth_remote_gatt_service_unittest.cc",
mbrunson32391c12016-11-18 23:42:1536 "bluetooth/device_unittest.cc",
Jason Majors47659c42019-07-08 18:23:2837 "bluetooth/public/cpp/bluetooth_uuid_unittest.cc",
Ryan Hansberryf750e142020-08-20 05:51:1738 "bluetooth/server_socket_unittest.cc",
Ryan Hansberrya39051bb2020-08-06 02:55:1939 "bluetooth/socket_unittest.cc",
ortunob755ff32016-08-25 21:29:3040 "bluetooth/string_util_icu_unittest.cc",
rkc3fb9aa6d2016-05-03 20:39:4441 "bluetooth/test/bluetooth_gatt_server_test.cc",
42 "bluetooth/test/bluetooth_gatt_server_test.h",
scheib545d7fd2015-06-30 22:26:5843 "bluetooth/test/bluetooth_test.cc",
44 "bluetooth/test/bluetooth_test.h",
scheib42e6b49d2015-04-29 21:46:5745 "bluetooth/test/test_bluetooth_adapter_observer.cc",
46 "bluetooth/test/test_bluetooth_adapter_observer.h",
Jan Wilken Doerried5832e62018-08-28 16:39:5047 "bluetooth/test/test_bluetooth_advertisement_observer.cc",
48 "bluetooth/test/test_bluetooth_advertisement_observer.h",
rkc3fb9aa6d2016-05-03 20:39:4449 "bluetooth/test/test_bluetooth_local_gatt_service_delegate.cc",
50 "bluetooth/test/test_bluetooth_local_gatt_service_delegate.h",
Jan Wilken Doerrie7aa28512018-08-17 08:11:4151 "bluetooth/test/test_pairing_delegate.cc",
52 "bluetooth/test/test_pairing_delegate.h",
Matt Reynolds7c498e52017-12-06 22:06:2453 "gamepad/abstract_haptic_gamepad_unittest.cc",
Matt Reynoldscdb73c32019-08-23 00:46:2954 "gamepad/dualshock4_controller_unittest.cc",
Matt Reynolds96bd76a2019-06-12 21:15:1655 "gamepad/gamepad_blocklist_unittest.cc",
Matt Reynolds054d99b2018-12-06 02:40:2456 "gamepad/gamepad_id_list_unittest.cc",
bajonesb9bb4c42016-07-07 00:10:5157 "gamepad/gamepad_provider_unittest.cc",
ke.hebee6a642016-12-10 01:56:1958 "gamepad/gamepad_service_unittest.cc",
Matt Reynolds27a13de2019-08-20 21:03:3359 "gamepad/hid_haptic_gamepad_unittest.cc",
Oksana Zhuravlova96b546c2018-08-08 19:01:3360 "gamepad/public/cpp/gamepad_mojom_traits_unittest.cc",
Matt Reynolds5fcd224792019-08-29 21:24:0161 "gamepad/xbox_hid_controller_unittest.cc",
tfarinacdc7e5d2015-02-23 09:52:2462 "test/run_all_unittests.cc",
tfarinacdc7e5d2015-02-23 09:52:2463 ]
64
Sylvain Defresne72188072020-10-05 11:54:4165 if (is_mac) {
66 sources += [
67 "bluetooth/bluetooth_adapter_mac_metrics_unittest.mm",
68 "bluetooth/bluetooth_adapter_mac_unittest.mm",
69 "bluetooth/bluetooth_low_energy_advertisement_manager_mac_unittest.mm",
70 "bluetooth/test/bluetooth_test_mac.h",
71 "bluetooth/test/bluetooth_test_mac.mm",
72 "bluetooth/test/mock_bluetooth_cbcharacteristic_mac.h",
73 "bluetooth/test/mock_bluetooth_cbcharacteristic_mac.mm",
74 "bluetooth/test/mock_bluetooth_cbdescriptor_mac.h",
75 "bluetooth/test/mock_bluetooth_cbdescriptor_mac.mm",
76 "bluetooth/test/mock_bluetooth_cbperipheral_mac.h",
77 "bluetooth/test/mock_bluetooth_cbperipheral_mac.mm",
78 "bluetooth/test/mock_bluetooth_cbservice_mac.h",
79 "bluetooth/test/mock_bluetooth_cbservice_mac.mm",
80 "bluetooth/test/mock_bluetooth_central_manager_mac.h",
81 "bluetooth/test/mock_bluetooth_central_manager_mac.mm",
82 ]
83 }
84
85 if (is_android) {
86 sources += [
87 "bluetooth/bluetooth_adapter_android_unittest.cc",
88 "bluetooth/test/bluetooth_test_android.cc",
89 "bluetooth/test/bluetooth_test_android.h",
90 ]
91 }
92
93 if (is_win) {
94 sources += [
95 "bluetooth/bluetooth_adapter_win_unittest.cc",
96 "bluetooth/bluetooth_device_win_unittest.cc",
97 "bluetooth/bluetooth_low_energy_win_unittest.cc",
98 "bluetooth/bluetooth_service_record_win_unittest.cc",
99 "bluetooth/bluetooth_task_manager_win_unittest.cc",
100 "bluetooth/test/bluetooth_test_win.cc",
101 "bluetooth/test/bluetooth_test_win.h",
102 ]
103 }
104
Scott Grahambf77d352018-10-25 17:50:54105 if (is_fuchsia) {
106 sources += [
107 "bluetooth/test/bluetooth_test_fuchsia.cc",
108 "bluetooth/test/bluetooth_test_fuchsia.h",
109 ]
110 }
111
tfarinacdc7e5d2015-02-23 09:52:24112 deps = [
Ovidio Henriquez21095442019-03-06 18:22:55113 "//base",
tfarinacdc7e5d2015-02-23 09:52:24114 "//base/test:test_support",
alexis.menardb39a30822016-09-30 15:14:39115 "//base/third_party/dynamic_annotations:dynamic_annotations",
Yuta Hijikata57d60812020-10-24 01:00:55116 "//build:chromeos_buildflags",
Jun Choi3545f502018-03-14 01:30:00117 "//components/apdu",
Kim Paulhamus35995bb62018-01-05 11:47:04118 "//components/cbor",
Donna Wu4dc9df32019-05-20 03:56:21119 "//components/device_event_log",
120 "//device/base",
alexis.menardb39a30822016-09-30 15:14:39121 "//device/base/synchronization",
tfarinacdc7e5d2015-02-23 09:52:24122 "//device/bluetooth",
Vincent Scheibdbe693bee2017-12-06 00:54:18123 "//device/bluetooth:deprecated_experimental_mojo",
Ryan Hansberryf750e142020-08-20 05:51:17124 "//device/bluetooth:fake_bluetooth",
brettw011138d2015-10-21 03:05:38125 "//device/bluetooth:mocks",
jdoerrie3e747742018-02-05 16:04:16126 "//device/fido",
Balazs Engedy83dc0822018-03-07 14:33:55127 "//device/fido:test_support",
bajonesb9bb4c42016-07-07 00:10:51128 "//device/gamepad",
129 "//device/gamepad:test_helpers",
juncai2f298a82017-04-18 03:51:39130 "//device/gamepad/public/cpp:shared_with_blink",
Reilly Grantfa93b142018-02-01 02:13:48131 "//device/gamepad/public/mojom",
Ken Rockot9b26bc52018-07-04 19:57:49132 "//mojo/core/embedder",
rockot85dce0862015-11-13 01:33:59133 "//mojo/public/cpp/bindings",
Oksana Zhuravlova96b546c2018-08-08 19:01:33134 "//mojo/public/cpp/test_support:test_utils",
tfarinacdc7e5d2015-02-23 09:52:24135 "//net",
136 "//testing/gmock",
137 "//testing/gtest",
Blink Reformata30d4232018-04-07 15:31:06138 "//third_party/blink/public:blink_headers",
Ovidio Henriquez21095442019-03-06 18:22:55139 "//ui/base",
tfarinacdc7e5d2015-02-23 09:52:24140 "//url",
141 ]
142
Ovidio Henriquez21095442019-03-06 18:22:55143 data_deps = [
144 "bluetooth/strings:bluetooth_test_strings",
145 "//ui/resources:ui_test_pak_data",
146 ]
147
Nina Satragno1867ead2020-06-15 18:38:13148 # Most of the FIDO implementation is not compiled in for Android.
149 if (!is_android) {
150 sources += [
151 "fido/attestation_statement_formats_unittest.cc",
Martin Kreichgauerdc572252020-10-16 17:46:10152 "fido/auth_token_requester_unittest.cc",
Nina Satragno1867ead2020-06-15 18:38:13153 "fido/bio/enrollment_handler_unittest.cc",
154 "fido/ble_adapter_manager_unittest.cc",
155 "fido/cable/fido_ble_connection_unittest.cc",
156 "fido/cable/fido_ble_frames_unittest.cc",
157 "fido/cable/fido_ble_transaction_unittest.cc",
158 "fido/cable/fido_cable_device_unittest.cc",
159 "fido/cable/fido_cable_discovery_unittest.cc",
160 "fido/cable/fido_cable_handshake_handler_unittest.cc",
161 "fido/cable/v2_handshake_unittest.cc",
162 "fido/cbor_extract_unittest.cc",
163 "fido/credential_management_handler_unittest.cc",
164 "fido/ctap_request_unittest.cc",
165 "fido/ctap_response_unittest.cc",
166 "fido/fake_fido_discovery_unittest.cc",
Nina Satragno395c0fb2020-09-14 22:30:07167 "fido/fido_device_authenticator_unittest.cc",
Nina Satragno1867ead2020-06-15 18:38:13168 "fido/fido_device_discovery_unittest.cc",
169 "fido/fido_parsing_utils_unittest.cc",
170 "fido/fido_request_handler_unittest.cc",
Adam Langley051b97932021-01-11 19:11:23171 "fido/filter_unittest.cc",
Nina Satragno1867ead2020-06-15 18:38:13172 "fido/get_assertion_handler_unittest.cc",
173 "fido/get_assertion_task_unittest.cc",
174 "fido/hid/fido_hid_message_unittest.cc",
Nina Satragno395c0fb2020-09-14 22:30:07175 "fido/large_blob_unittest.cc",
Nina Satragno1867ead2020-06-15 18:38:13176 "fido/make_credential_handler_unittest.cc",
177 "fido/make_credential_task_unittest.cc",
Martin Kreichgauer0787dc32020-10-05 17:44:11178 "fido/pin_unittest.cc",
Nina Satragno1867ead2020-06-15 18:38:13179 "fido/test_callback_receiver_unittest.cc",
180 "fido/u2f_command_constructor_unittest.cc",
181 "fido/u2f_register_operation_unittest.cc",
182 "fido/u2f_sign_operation_unittest.cc",
183 "fido/virtual_ctap2_device_unittest.cc",
184 "fido/virtual_u2f_device_unittest.cc",
Nina Satragno1867ead2020-06-15 18:38:13185 ]
186
187 deps += [ "//device/fido:mocks" ]
188 }
189
Sylvain Defresne72188072020-10-05 11:54:41190 if (is_mac) {
191 sources += [
192 "fido/mac/browsing_data_deletion_unittest.mm",
193 "fido/mac/credential_metadata_unittest.cc",
194 "fido/mac/get_assertion_operation_unittest_mac.mm",
195 "fido/mac/make_credential_operation_unittest_mac.mm",
196 "fido/mac/util_unittest.cc",
197 ]
198 }
199
200 if (is_win) {
201 sources += [ "fido/win/type_conversions_unittest.cc" ]
202 }
203
Nina Satragno1867ead2020-06-15 18:38:13204 # FIDO HID:
scheibcfdca0e2015-04-01 05:27:58205 # Android doesn't compile.
scheib7a4cf042015-03-31 04:33:44206 # Linux, requires udev.
scheibcfdca0e2015-04-01 05:27:58207 if (!is_linux_without_udev && !is_android) {
scheib7a4cf042015-03-31 04:33:44208 sources += [
Kim Paulhamus534308e2018-07-23 20:58:43209 "fido/hid/fido_hid_device_unittest.cc",
210 "fido/hid/fido_hid_discovery_unittest.cc",
scheib7a4cf042015-03-31 04:33:44211 ]
212 deps += [
jdoerrie3e747742018-02-05 16:04:16213 "//device/fido:test_support",
Ke He624b52d2017-11-09 13:45:09214 "//services/device/public/cpp/hid",
Ke He31d0bb02018-02-24 07:16:24215 "//services/device/public/mojom",
scheib7a4cf042015-03-31 04:33:44216 ]
217 }
218
219 if (use_udev) {
Matt Reynoldsd4103e72020-05-07 21:33:50220 sources += [
221 "udev_linux/udev_unittest.cc",
222 "udev_linux/udev_watcher_unittest.cc",
223 ]
Zentaro Kavanagh8c7826f2020-04-30 22:11:03224 deps += [
225 "//device/udev_linux",
226 "//device/udev_linux:test_support",
227 ]
scheib7a4cf042015-03-31 04:33:44228 }
229
scheib56010cc2015-06-25 01:29:47230 if (is_android) {
agrieve97176362015-12-01 16:36:19231 deps += [
232 ":bluetooth_test_java",
233 ":bluetooth_test_jni_headers",
234 ]
scheib56010cc2015-06-25 01:29:47235 }
236
Yuta Hijikataf63e155e2020-12-17 00:44:19237 if (is_chromeos_ash) {
Ryan Hansberry27c9c582019-03-22 04:38:52238 sources += [ "bluetooth/chromeos/bluetooth_utils_unittest.cc" ]
239 deps += [ "//chromeos/constants" ]
240 }
241
dnicoara59acb3022015-12-17 18:13:16242 if ((is_chromeos || is_linux) && use_dbus) {
agrieve95ba4442016-04-25 15:47:13243 configs += [ "//build/config/linux/dbus" ]
rkc41077042015-11-06 07:20:58244
245 sources += [
rkc122239752016-04-20 23:59:08246 "bluetooth/bluez/bluetooth_adapter_profile_bluez_unittest.cc",
247 "bluetooth/bluez/bluetooth_advertisement_bluez_unittest.cc",
rkc122239752016-04-20 23:59:08248 "bluetooth/bluez/bluetooth_bluez_unittest.cc",
249 "bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc",
rkc2ffd5612016-06-24 02:00:22250 "bluetooth/bluez/bluetooth_service_attribute_value_bluez_unittest.cc",
251 "bluetooth/bluez/bluetooth_service_record_bluez_unittest.cc",
rkc122239752016-04-20 23:59:08252 "bluetooth/bluez/bluetooth_socket_bluez_unittest.cc",
rkca7a149d2016-04-29 08:15:37253 "bluetooth/dbus/bluetooth_gatt_application_service_provider_unittest.cc",
rkc519a20c62016-04-16 23:18:07254 "bluetooth/test/bluetooth_test_bluez.cc",
255 "bluetooth/test/bluetooth_test_bluez.h",
rkc41077042015-11-06 07:20:58256 ]
257
258 deps += [ "//dbus" ]
James Hollyer976d3eea2019-10-02 06:21:09259
Yuta Hijikataf63e155e2020-12-17 00:44:19260 if (is_chromeos_ash) {
James Hollyer976d3eea2019-10-02 06:21:09261 deps += [ "//services/data_decoder/public/mojom" ]
262 }
rkc41077042015-11-06 07:20:58263 }
264
Sean McAllister224ef732020-08-04 17:27:55265 if (is_linux || is_chromeos) {
Stephen Lanham1316af42018-04-04 01:26:28266 if (is_chromecast) {
Stephen Lanhamccd5c252018-04-10 04:21:56267 # Cast does not support GATT server mode.
268 sources -= [
269 "bluetooth/bluetooth_local_gatt_characteristic_unittest.cc",
270 "bluetooth/bluetooth_local_gatt_descriptor_unittest.cc",
271 "bluetooth/bluetooth_local_gatt_service_unittest.cc",
272 ]
273
Stephen Lanham1316af42018-04-04 01:26:28274 sources += [
275 "bluetooth/cast/bluetooth_adapter_cast_unittest.cc",
276 "bluetooth/cast/bluetooth_utils_unittest.cc",
Stephen Lanhamccd5c252018-04-10 04:21:56277 "bluetooth/test/bluetooth_test_cast.cc",
278 "bluetooth/test/bluetooth_test_cast.h",
Stephen Lanham1316af42018-04-04 01:26:28279 ]
Stephen Lanhamccd5c252018-04-10 04:21:56280
281 deps += [
282 "//chromecast/device/bluetooth:util",
283 "//chromecast/device/bluetooth/le",
Bailey Forrestfda35092018-05-16 00:30:44284 "//chromecast/device/bluetooth/le:test_support",
Stephen Lanhamccd5c252018-04-10 04:21:56285 "//chromecast/device/bluetooth/shlib:mock_shlib",
286 ]
Stephen Lanham1316af42018-04-04 01:26:28287 }
Pavel Kalinnikov9f6591002017-11-01 22:09:18288 }
289
tfarinacdc7e5d2015-02-23 09:52:24290 if (is_mac) {
krstnmnlsn332a71cf2015-07-17 18:59:58291 deps += [ "//third_party/ocmock" ]
292 ldflags = [ "-ObjC" ]
Robert Sesek95a026b2020-06-30 23:22:01293 frameworks = [
Robert Seseke55299452020-02-19 15:18:14294 "CoreBluetooth.framework",
rsesekdbb69c72016-05-11 17:26:35295 "IOBluetooth.framework",
296 "IOKit.framework",
297 ]
tfarinacdc7e5d2015-02-23 09:52:24298 }
gogeraldcab31232016-02-03 21:20:33299
300 if (is_win) {
301 sources += [
gogeraldb8c706a2016-02-05 01:07:37302 "bluetooth/bluetooth_classic_win_fake.cc",
303 "bluetooth/bluetooth_classic_win_fake.h",
gogeraldcab31232016-02-03 21:20:33304 "bluetooth/bluetooth_low_energy_win_fake.cc",
305 "bluetooth/bluetooth_low_energy_win_fake.h",
Jan Wilken Doerriecc0bd292018-05-14 12:28:28306 "bluetooth/test/fake_bluetooth_adapter_winrt.cc",
307 "bluetooth/test/fake_bluetooth_adapter_winrt.h",
Jan Wilken Doerriec75765a752018-07-20 11:36:18308 "bluetooth/test/fake_bluetooth_le_advertisement_data_section_winrt.cc",
309 "bluetooth/test/fake_bluetooth_le_advertisement_data_section_winrt.h",
Jan Wilken Doerrief397e842018-08-23 17:40:17310 "bluetooth/test/fake_bluetooth_le_advertisement_publisher_status_changed_event_args_winrt.cc",
311 "bluetooth/test/fake_bluetooth_le_advertisement_publisher_status_changed_event_args_winrt.h",
312 "bluetooth/test/fake_bluetooth_le_advertisement_publisher_winrt.cc",
313 "bluetooth/test/fake_bluetooth_le_advertisement_publisher_winrt.h",
Jan Wilken Dörried4dc7782018-06-04 09:38:13314 "bluetooth/test/fake_bluetooth_le_advertisement_received_event_args_winrt.cc",
315 "bluetooth/test/fake_bluetooth_le_advertisement_received_event_args_winrt.h",
316 "bluetooth/test/fake_bluetooth_le_advertisement_watcher_winrt.cc",
317 "bluetooth/test/fake_bluetooth_le_advertisement_watcher_winrt.h",
318 "bluetooth/test/fake_bluetooth_le_advertisement_winrt.cc",
319 "bluetooth/test/fake_bluetooth_le_advertisement_winrt.h",
Jan Wilken Doerried9b78b92018-06-18 17:35:43320 "bluetooth/test/fake_bluetooth_le_device_winrt.cc",
321 "bluetooth/test/fake_bluetooth_le_device_winrt.h",
Jan Wilken Doerriec75765a752018-07-20 11:36:18322 "bluetooth/test/fake_bluetooth_le_manufacturer_data_winrt.cc",
323 "bluetooth/test/fake_bluetooth_le_manufacturer_data_winrt.h",
Jan Wilken Doerrie7aa28512018-08-17 08:11:41324 "bluetooth/test/fake_device_information_custom_pairing_winrt.cc",
325 "bluetooth/test/fake_device_information_custom_pairing_winrt.h",
Jan Wilken Doerrie9092f832018-08-14 07:05:11326 "bluetooth/test/fake_device_information_pairing_winrt.cc",
327 "bluetooth/test/fake_device_information_pairing_winrt.h",
Jan Wilken Doerrie7c0e41dc2018-05-16 08:37:52328 "bluetooth/test/fake_device_information_winrt.cc",
329 "bluetooth/test/fake_device_information_winrt.h",
Jan Wilken Doerrie7aa28512018-08-17 08:11:41330 "bluetooth/test/fake_device_pairing_requested_event_args_winrt.cc",
331 "bluetooth/test/fake_device_pairing_requested_event_args_winrt.h",
332 "bluetooth/test/fake_device_pairing_result_winrt.cc",
333 "bluetooth/test/fake_device_pairing_result_winrt.h",
Jan Wilken Doerriebcd90ba2018-08-30 12:36:29334 "bluetooth/test/fake_device_watcher_winrt.cc",
335 "bluetooth/test/fake_device_watcher_winrt.h",
Jan Wilken Doerried66e0a92018-07-07 10:48:19336 "bluetooth/test/fake_gatt_characteristic_winrt.cc",
337 "bluetooth/test/fake_gatt_characteristic_winrt.h",
338 "bluetooth/test/fake_gatt_characteristics_result_winrt.cc",
339 "bluetooth/test/fake_gatt_characteristics_result_winrt.h",
Jan Wilken Doerrie2a3e6c92018-07-31 08:39:16340 "bluetooth/test/fake_gatt_descriptor_winrt.cc",
341 "bluetooth/test/fake_gatt_descriptor_winrt.h",
342 "bluetooth/test/fake_gatt_descriptors_result_winrt.cc",
343 "bluetooth/test/fake_gatt_descriptors_result_winrt.h",
Jan Wilken Doerried9b78b92018-06-18 17:35:43344 "bluetooth/test/fake_gatt_device_service_winrt.cc",
345 "bluetooth/test/fake_gatt_device_service_winrt.h",
346 "bluetooth/test/fake_gatt_device_services_result_winrt.cc",
347 "bluetooth/test/fake_gatt_device_services_result_winrt.h",
Jan Wilken Doerrie1bd49ee2018-07-30 10:59:00348 "bluetooth/test/fake_gatt_read_result_winrt.cc",
349 "bluetooth/test/fake_gatt_read_result_winrt.h",
Martin Kreichgauer3d6c10d2020-06-16 17:25:51350 "bluetooth/test/fake_gatt_session_winrt.cc",
351 "bluetooth/test/fake_gatt_session_winrt.h",
Jan Wilken Dörriee0029d12018-08-06 14:06:08352 "bluetooth/test/fake_gatt_value_changed_event_args_winrt.cc",
353 "bluetooth/test/fake_gatt_value_changed_event_args_winrt.h",
Jan Wilken Doerrief5b008c42018-08-01 08:12:56354 "bluetooth/test/fake_gatt_write_result_winrt.cc",
355 "bluetooth/test/fake_gatt_write_result_winrt.h",
Jan Wilken Dörriedc7c81c2018-06-12 07:34:38356 "bluetooth/test/fake_radio_winrt.cc",
357 "bluetooth/test/fake_radio_winrt.h",
gogeraldcab31232016-02-03 21:20:33358 ]
359 }
bajones7ab52ec32016-08-19 19:54:25360
Bill Orr1862b4f2018-05-10 17:56:45361 if (enable_vr) {
Michael Thiessen21e56152017-10-16 18:55:17362 sources += [
Anna Maria114d35052017-12-08 23:13:29363 "vr/orientation/orientation_device_provider_unittest.cc",
364 "vr/orientation/orientation_device_unittest.cc",
Bill Orrb35b4cd82019-03-05 00:13:39365 "vr/util/fps_meter_unittest.cc",
366 "vr/util/sliding_average_unittest.cc",
Alex Cooper93f1c752019-11-22 23:58:02367 "vr/util/stage_utils_unittest.cc",
Michael Thiessen21e56152017-10-16 18:55:17368 "vr/vr_device_base_unittest.cc",
Michael Thiessen21e56152017-10-16 18:55:17369 ]
bajones7ab52ec32016-08-19 19:54:25370
Bill Orr1862b4f2018-05-10 17:56:45371 defines = [ "DEVICE_VR_IMPLEMENTATION" ]
372
bajones7ab52ec32016-08-19 19:54:25373 deps += [
374 "//device/vr",
Alexander Cooper53e25812020-04-01 17:35:58375 "//device/vr:vr_fakes",
Alexander Coopercb573b02020-04-21 22:16:35376 "//device/vr/orientation",
Rafael Cintron5b95b8d2020-11-04 01:58:10377 "//device/vr/public/mojom:isolated_xr_service",
Anna Maria114d35052017-12-08 23:13:29378 "//services/device/public/cpp/generic_sensor",
379 "//ui/display",
Roman Karasev72254172018-04-05 18:10:03380 "//ui/display:test_support",
bajones7ab52ec32016-08-19 19:54:25381 ]
382 }
Matt Reynoldsb37eb1292019-03-19 22:19:40383
384 # Some gamepad tests require the HID service. Only build these tests on
385 # platforms where the HID service is enabled.
386 if (!is_android && !is_fuchsia) {
387 sources += [ "gamepad/nintendo_data_fetcher_unittest.cc" ]
388
389 deps += [
390 "//services/device:test_support",
391 "//services/device/hid",
392 "//services/device/hid:mocks",
393 ]
394 }
tfarinacdc7e5d2015-02-23 09:52:24395}
scheib56010cc2015-06-25 01:29:47396
397if (is_android) {
Matt Reynolds7c498e52017-12-06 22:06:24398 bluetooth_java_sources_needing_jni = [
399 "bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java",
James Hollyerf8e00682019-11-20 02:11:21400 "bluetooth/test/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothScanFilter.java",
Matt Reynolds7c498e52017-12-06 22:06:24401 ]
scheib56010cc2015-06-25 01:29:47402
403 generate_jni("bluetooth_test_jni_headers") {
Eric Stevenson4c4d6342019-10-04 20:02:47404 testonly = true
scheib56010cc2015-06-25 01:29:47405 sources = bluetooth_java_sources_needing_jni
scheib56010cc2015-06-25 01:29:47406 }
407
408 android_library("bluetooth_test_java") {
Shimi Zhang0d7b74af2018-02-08 17:28:02409 testonly = true
Natalie Chouinard8b9cf7c2019-12-20 02:21:40410 sources = bluetooth_java_sources_needing_jni
scheib56010cc2015-06-25 01:29:47411 deps = [
412 "//base:base_java",
ortuno5966ddb2016-07-01 02:07:25413 "//components/location/android:location_java",
scheib56010cc2015-06-25 01:29:47414 "//device/bluetooth:java",
Ben Joyce5f8afefd2019-09-13 07:21:03415 "//third_party/android_deps:androidx_annotation_annotation_java",
Peter Wen22bc3ec2019-03-28 22:18:02416 "//third_party/android_sdk:android_test_mock_java",
scheib56010cc2015-06-25 01:29:47417 ]
ortunocc9b46d12016-08-25 16:47:23418
419 srcjar_deps = [ ":bluetooth_test_javagen" ]
scheib56010cc2015-06-25 01:29:47420 }
bajonesb9bb4c42016-07-07 00:10:51421
422 junit_binary("device_junit_tests") {
Nico Weberb355af2e2020-01-14 03:27:58423 sources = [ "gamepad/android/junit/src/org/chromium/device/gamepad/GamepadMappingsTest.java" ]
bajonesb9bb4c42016-07-07 00:10:51424 deps = [
mcasas649deb52017-04-28 01:55:52425 "$google_play_services_package:google_play_services_base_java",
426 "$google_play_services_package:google_play_services_basement_java",
427 "$google_play_services_package:google_play_services_location_java",
bajonesb9bb4c42016-07-07 00:10:51428 "//base:base_java",
429 "//base:base_java_test_support",
Andrew Grieve916bc9b2018-02-02 01:38:59430 "//base:base_junit_test_support",
bajonesb9bb4c42016-07-07 00:10:51431 "//device/gamepad:java",
alexander.shalamov55ac6a4c2016-11-30 09:04:17432 "//mojo/public/java:bindings_java",
Ben Joyce5f8afefd2019-09-13 07:21:03433 "//third_party/android_deps:androidx_annotation_annotation_java",
Andrew Walbrand8f55c92020-07-01 17:09:03434 "//third_party/hamcrest:hamcrest_java",
bajonesb9bb4c42016-07-07 00:10:51435 ]
436 srcjar_deps = [ "//device/gamepad:java_enums_srcjar" ]
437 }
ortunocc9b46d12016-08-25 16:47:23438
439 java_cpp_enum("bluetooth_test_javagen") {
Nico Weberb355af2e2020-01-14 03:27:58440 sources = [ "bluetooth/test/bluetooth_test.h" ]
ortunocc9b46d12016-08-25 16:47:23441 }
scheib56010cc2015-06-25 01:29:47442}