blob: 1ddb4c35518b8e58ba97c73527310e6723dd204a [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
5import("//build/config/features.gni")
Scott Violetc8240b02018-03-08 22:03:596import("//device/vr/buildflags/buildflags.gni")
tfarinacdc7e5d2015-02-23 09:52:247import("//testing/test.gni")
8
scheib56010cc2015-06-25 01:29:479if (is_android) {
mcasas649deb52017-04-28 01:55:5210 import("//build/config/android/config.gni")
scheib56010cc2015-06-25 01:29:4711 import("//build/config/android/rules.gni") # For generate_jni().
12}
13
erikchenceb2fff2015-04-27 17:50:5414if (is_mac) {
15 import("//build/config/mac/mac_sdk.gni")
16}
17
scheib7a4cf042015-03-31 04:33:4418is_linux_without_udev = is_linux && !use_udev
scheib7a4cf042015-03-31 04:33:4419
tfarinacdc7e5d2015-02-23 09:52:2420test("device_unittests") {
21 sources = [
alexis.menardb39a30822016-09-30 15:14:3922 "base/synchronization/one_writer_seqlock_unittest.cc",
tfarinacdc7e5d2015-02-23 09:52:2423 "bluetooth/bluetooth_adapter_mac_unittest.mm",
tfarinacdc7e5d2015-02-23 09:52:2424 "bluetooth/bluetooth_adapter_unittest.cc",
25 "bluetooth/bluetooth_adapter_win_unittest.cc",
ortuno945c90d2015-09-01 01:47:0826 "bluetooth/bluetooth_advertisement_unittest.cc",
tfarinacdc7e5d2015-02-23 09:52:2427 "bluetooth/bluetooth_device_unittest.cc",
28 "bluetooth/bluetooth_device_win_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",
tfarinacdc7e5d2015-02-23 09:52:2433 "bluetooth/bluetooth_low_energy_win_unittest.cc",
rkc122239752016-04-20 23:59:0834 "bluetooth/bluetooth_remote_gatt_characteristic_unittest.cc",
35 "bluetooth/bluetooth_remote_gatt_descriptor_unittest.cc",
36 "bluetooth/bluetooth_remote_gatt_service_unittest.cc",
tfarinacdc7e5d2015-02-23 09:52:2437 "bluetooth/bluetooth_service_record_win_unittest.cc",
tfarinacdc7e5d2015-02-23 09:52:2438 "bluetooth/bluetooth_task_manager_win_unittest.cc",
39 "bluetooth/bluetooth_uuid_unittest.cc",
mbrunson32391c12016-11-18 23:42:1540 "bluetooth/device_unittest.cc",
ortunob755ff32016-08-25 21:29:3041 "bluetooth/string_util_icu_unittest.cc",
rkc3fb9aa6d2016-05-03 20:39:4442 "bluetooth/test/bluetooth_gatt_server_test.cc",
43 "bluetooth/test/bluetooth_gatt_server_test.h",
scheib545d7fd2015-06-30 22:26:5844 "bluetooth/test/bluetooth_test.cc",
45 "bluetooth/test/bluetooth_test.h",
46 "bluetooth/test/bluetooth_test_android.cc",
47 "bluetooth/test/bluetooth_test_android.h",
krstnmnlsn56d371032015-07-21 20:18:0748 "bluetooth/test/bluetooth_test_mac.h",
49 "bluetooth/test/bluetooth_test_mac.mm",
gogerald512935cc2016-01-27 01:11:1850 "bluetooth/test/bluetooth_test_win.cc",
51 "bluetooth/test/bluetooth_test_win.h",
jlebel620327d2016-06-20 13:01:0052 "bluetooth/test/mock_bluetooth_cbcharacteristic_mac.h",
53 "bluetooth/test/mock_bluetooth_cbcharacteristic_mac.mm",
jlebel9bb8cf242017-01-10 01:29:0254 "bluetooth/test/mock_bluetooth_cbdescriptor_mac.h",
55 "bluetooth/test/mock_bluetooth_cbdescriptor_mac.mm",
jlebela58fd752016-03-14 10:33:2856 "bluetooth/test/mock_bluetooth_cbperipheral_mac.h",
57 "bluetooth/test/mock_bluetooth_cbperipheral_mac.mm",
jlebelc4b09782016-05-10 00:31:5858 "bluetooth/test/mock_bluetooth_cbservice_mac.h",
59 "bluetooth/test/mock_bluetooth_cbservice_mac.mm",
jlebela58fd752016-03-14 10:33:2860 "bluetooth/test/mock_bluetooth_central_manager_mac.h",
61 "bluetooth/test/mock_bluetooth_central_manager_mac.mm",
scheib42e6b49d2015-04-29 21:46:5762 "bluetooth/test/test_bluetooth_adapter_observer.cc",
63 "bluetooth/test/test_bluetooth_adapter_observer.h",
rkc3fb9aa6d2016-05-03 20:39:4464 "bluetooth/test/test_bluetooth_local_gatt_service_delegate.cc",
65 "bluetooth/test/test_bluetooth_local_gatt_service_delegate.h",
reillygaaee8912017-03-23 22:16:0666 "bluetooth/uribeacon/uri_encoder_unittest.cc",
jdoerrie98ee9e32018-02-05 22:03:4467 "fido/ctap_request_unittest.cc",
68 "fido/ctap_response_unittest.cc",
Jun Choiaaa7d012018-03-16 20:11:4069 "fido/fake_fido_discovery_unittest.cc",
Jun Choi1710f5a2018-03-16 21:09:1970 "fido/fido_ble_connection_unittest.cc",
71 "fido/fido_ble_device_unittest.cc",
72 "fido/fido_ble_frames_unittest.cc",
Jun Choifba5de352018-05-16 05:31:0473 "fido/fido_cable_device_unittest.cc",
Jun Choia6bde782018-05-16 03:58:3674 "fido/fido_cable_discovery_unittest.cc",
Jun Choibea02722018-06-15 02:17:5475 "fido/fido_cable_handshake_handler_unittest.cc",
Jun Choiaaa7d012018-03-16 20:11:4076 "fido/fido_discovery_unittest.cc",
Jun Choib780ce9d2018-02-07 02:19:2577 "fido/fido_hid_message_unittest.cc",
Jun Choi19b944e92018-04-23 20:20:2078 "fido/fido_parsing_utils_unittest.cc",
Jun Choi1c36cd82018-03-28 00:32:4279 "fido/fido_request_handler_unittest.cc",
Jun Choi4fc8b7812018-04-05 07:39:0780 "fido/get_assertion_handler_unittest.cc",
Jun Choi177d2ac2018-03-28 08:32:1681 "fido/get_assertion_task_unittest.cc",
Martin Kreichgauer9b5dab32018-06-06 12:26:3982 "fido/mac/credential_metadata_unittest.cc",
Martin Kreichgauereaf85f12018-05-01 19:52:4283 "fido/mac/get_assertion_operation_unittest_mac.mm",
84 "fido/mac/make_credential_operation_unittest_mac.mm",
Martin Kreichgauer35bea102018-06-28 20:41:3285 "fido/mac/util_unittest.cc",
Jun Choif7ab0df2018-04-05 21:48:1686 "fido/make_credential_handler_unittest.cc",
Jun Choif15afe42018-03-22 23:58:0187 "fido/make_credential_task_unittest.cc",
Balazs Engedy1ab4b142018-03-09 12:45:0388 "fido/test_callback_receiver_unittest.cc",
Jun Choi85b28722018-04-25 21:24:5089 "fido/u2f_command_constructor_unittest.cc",
Jun Choif45741d2018-06-08 20:58:3190 "fido/u2f_register_operation_unittest.cc",
Jun Choi0e56e5dd2018-06-08 21:27:3491 "fido/u2f_sign_operation_unittest.cc",
Matt Reynolds7c498e52017-12-06 22:06:2492 "gamepad/abstract_haptic_gamepad_unittest.cc",
bajonesb9bb4c42016-07-07 00:10:5193 "gamepad/gamepad_provider_unittest.cc",
ke.hebee6a642016-12-10 01:56:1994 "gamepad/gamepad_service_unittest.cc",
Reilly Grantfa93b142018-02-01 02:13:4895 "gamepad/public/mojom/gamepad_mojom_traits_unittest.cc",
tfarinacdc7e5d2015-02-23 09:52:2496 "test/run_all_unittests.cc",
tfarinacdc7e5d2015-02-23 09:52:2497 ]
98
99 deps = [
100 "//base/test:test_support",
alexis.menardb39a30822016-09-30 15:14:39101 "//base/third_party/dynamic_annotations:dynamic_annotations",
Jun Choi3545f502018-03-14 01:30:00102 "//components/apdu",
Kim Paulhamus35995bb62018-01-05 11:47:04103 "//components/cbor",
alexis.menardb39a30822016-09-30 15:14:39104 "//device/base/synchronization",
tfarinacdc7e5d2015-02-23 09:52:24105 "//device/bluetooth",
Vincent Scheibdbe693bee2017-12-06 00:54:18106 "//device/bluetooth:deprecated_experimental_mojo",
brettw011138d2015-10-21 03:05:38107 "//device/bluetooth:mocks",
reillygaaee8912017-03-23 22:16:06108 "//device/bluetooth/uribeacon",
jdoerrie3e747742018-02-05 16:04:16109 "//device/fido",
110 "//device/fido:mocks",
Balazs Engedy83dc0822018-03-07 14:33:55111 "//device/fido:test_support",
bajonesb9bb4c42016-07-07 00:10:51112 "//device/gamepad",
113 "//device/gamepad:test_helpers",
juncai2f298a82017-04-18 03:51:39114 "//device/gamepad/public/cpp:shared_with_blink",
Reilly Grantfa93b142018-02-01 02:13:48115 "//device/gamepad/public/mojom",
116 "//device/gamepad/public/mojom:gamepad_mojom_traits_test",
Ken Rockot9b26bc52018-07-04 19:57:49117 "//mojo/core/embedder",
rockot85dce0862015-11-13 01:33:59118 "//mojo/public/cpp/bindings",
tfarinacdc7e5d2015-02-23 09:52:24119 "//net",
120 "//testing/gmock",
121 "//testing/gtest",
Blink Reformata30d4232018-04-07 15:31:06122 "//third_party/blink/public:blink_headers",
reillyg872fd9fc2016-02-04 21:50:04123 "//tools/usb_gadget",
tfarinacdc7e5d2015-02-23 09:52:24124 "//url",
125 ]
126
Ke He624b52d2017-11-09 13:45:09127 # U2F and Serial:
scheibcfdca0e2015-04-01 05:27:58128 # Android doesn't compile.
scheib7a4cf042015-03-31 04:33:44129 # Linux, requires udev.
scheibcfdca0e2015-04-01 05:27:58130 if (!is_linux_without_udev && !is_android) {
scheib7a4cf042015-03-31 04:33:44131 sources += [
Jun Choiaaa7d012018-03-16 20:11:40132 "fido/fido_hid_device_unittest.cc",
133 "fido/fido_hid_discovery_unittest.cc",
scheib7a4cf042015-03-31 04:33:44134 ]
135 deps += [
jdoerrie3e747742018-02-05 16:04:16136 "//device/fido:test_support",
Ke He624b52d2017-11-09 13:45:09137 "//services/device/public/cpp/hid",
Ke He31d0bb02018-02-24 07:16:24138 "//services/device/public/mojom",
Ke He5c1e93a32017-10-05 04:27:35139 "//services/service_manager/public/cpp",
Ken Rockot543f5e32018-02-04 02:13:50140 "//services/service_manager/public/mojom",
scheib7a4cf042015-03-31 04:33:44141 ]
Ke He624b52d2017-11-09 13:45:09142
143 # Serial is supported in below platforms. See //device/servial/BUILD.gn
144 if (is_win || is_linux || is_mac) {
Fabrice de Gans-Riberiaa5eccec2018-04-23 23:00:30145 sources += [ "serial/serial_device_enumerator_unittest.cc" ]
Vincent Scheibdbe693bee2017-12-06 00:54:18146 deps += [ "//device/serial" ]
Fabrice de Gans-Riberiaa5eccec2018-04-23 23:00:30147 if (is_linux || is_mac) {
148 sources += [ "serial/serial_io_handler_posix_unittest.cc" ]
149 }
Ke He624b52d2017-11-09 13:45:09150 }
scheib7a4cf042015-03-31 04:33:44151 }
152
153 if (use_udev) {
154 sources += [ "udev_linux/udev_unittest.cc" ]
155 deps += [ "//device/udev_linux" ]
156 }
157
reillygcf1af632015-11-18 16:42:58158 # USB does not compile on iOS.
159 if (!is_ios) {
scheibcfdca0e2015-04-01 05:27:58160 sources += [
reillygbadbc5412015-08-28 23:08:10161 "test/test_device_client.cc",
162 "test/test_device_client.h",
reillyg64c8f4f2016-02-10 23:29:20163 "usb/mojo/device_impl_unittest.cc",
164 "usb/mojo/device_manager_impl_unittest.cc",
reillyg1f45f772016-04-02 02:46:55165 "usb/mojo/mock_permission_provider.cc",
166 "usb/mojo/mock_permission_provider.h",
Reilly Grant7f162c92017-06-10 00:23:47167 "usb/public/cpp/filter_utils_unittest.cc",
reillyg86549e52015-08-15 03:00:43168 "usb/usb_descriptors_unittest.cc",
scheibcfdca0e2015-04-01 05:27:58169 "usb/usb_device_handle_unittest.cc",
scheibcfdca0e2015-04-01 05:27:58170 "usb/usb_service_unittest.cc",
reillyg86549e52015-08-15 03:00:43171 "usb/webusb_descriptors_unittest.cc",
scheibcfdca0e2015-04-01 05:27:58172 ]
173 deps += [
Ke He624b52d2017-11-09 13:45:09174 ":usb_test_gadget",
alexis.menard2fe63eaa2016-10-13 21:42:43175 "//device/base",
176 "//device/base:mocks",
scheibcfdca0e2015-04-01 05:27:58177 "//device/usb",
reillygcff166d2016-05-20 20:15:42178 "//device/usb:test_support",
reillyg64c8f4f2016-02-10 23:29:20179 "//device/usb/mojo",
Reilly Grant7f162c92017-06-10 00:23:47180 "//device/usb/public/cpp",
Reilly Grantfa93b142018-02-01 02:13:48181 "//device/usb/public/mojom",
rhalavatid75e16c32017-03-03 15:08:24182 "//net:test_support",
scheibcfdca0e2015-04-01 05:27:58183 ]
Reilly Grant5ac479c2017-10-03 16:57:37184
185 if (!is_android) {
Samuel Huang2cb0922d2017-10-30 18:37:00186 sources += [ "usb/usb_ids_unittest.cc" ]
Reilly Grant5ac479c2017-10-03 16:57:37187 }
scheibcfdca0e2015-04-01 05:27:58188 }
189
reillygcf1af632015-11-18 16:42:58190 # UsbContext is a libusb-specific object.
reillygdee7c4ac2016-05-27 21:15:02191 if (is_mac || is_win) {
reillygcf1af632015-11-18 16:42:58192 sources += [ "usb/usb_context_unittest.cc" ]
brettwbda835b2015-12-04 22:12:30193 deps += [ "//third_party/libusb" ]
reillygcf1af632015-11-18 16:42:58194 }
195
scheib56010cc2015-06-25 01:29:47196 if (is_android) {
agrieve97176362015-12-01 16:36:19197 deps += [
198 ":bluetooth_test_java",
199 ":bluetooth_test_jni_headers",
reillyg16001d92016-06-01 00:44:30200 "//device/usb:java",
agrieve97176362015-12-01 16:36:19201 ]
scheib56010cc2015-06-25 01:29:47202 }
203
scheib7a4cf042015-03-31 04:33:44204 if (is_chromeos) {
tfarinacdc7e5d2015-02-23 09:52:24205 deps += [
206 "//chromeos",
207 "//chromeos:test_support",
208 "//chromeos:test_support_without_gmock",
tfarinacdc7e5d2015-02-23 09:52:24209 ]
210 }
211
dnicoara59acb3022015-12-17 18:13:16212 if ((is_chromeos || is_linux) && use_dbus) {
agrieve95ba4442016-04-25 15:47:13213 configs += [ "//build/config/linux/dbus" ]
rkc41077042015-11-06 07:20:58214
215 sources += [
rkc122239752016-04-20 23:59:08216 "bluetooth/bluez/bluetooth_adapter_profile_bluez_unittest.cc",
217 "bluetooth/bluez/bluetooth_advertisement_bluez_unittest.cc",
rkc122239752016-04-20 23:59:08218 "bluetooth/bluez/bluetooth_bluez_unittest.cc",
219 "bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc",
rkc2ffd5612016-06-24 02:00:22220 "bluetooth/bluez/bluetooth_service_attribute_value_bluez_unittest.cc",
221 "bluetooth/bluez/bluetooth_service_record_bluez_unittest.cc",
rkc122239752016-04-20 23:59:08222 "bluetooth/bluez/bluetooth_socket_bluez_unittest.cc",
rkca7a149d2016-04-29 08:15:37223 "bluetooth/dbus/bluetooth_gatt_application_service_provider_unittest.cc",
rkc519a20c62016-04-16 23:18:07224 "bluetooth/test/bluetooth_test_bluez.cc",
225 "bluetooth/test/bluetooth_test_bluez.h",
rkc41077042015-11-06 07:20:58226 ]
227
228 deps += [ "//dbus" ]
229 }
230
Pavel Kalinnikov9f6591002017-11-01 22:09:18231 if (is_linux) {
Stephen Lanham1316af42018-04-04 01:26:28232 if (is_chromecast) {
Stephen Lanhamccd5c252018-04-10 04:21:56233 # Cast does not support GATT server mode.
234 sources -= [
235 "bluetooth/bluetooth_local_gatt_characteristic_unittest.cc",
236 "bluetooth/bluetooth_local_gatt_descriptor_unittest.cc",
237 "bluetooth/bluetooth_local_gatt_service_unittest.cc",
238 ]
239
Stephen Lanham1316af42018-04-04 01:26:28240 sources += [
241 "bluetooth/cast/bluetooth_adapter_cast_unittest.cc",
242 "bluetooth/cast/bluetooth_utils_unittest.cc",
Stephen Lanhamccd5c252018-04-10 04:21:56243 "bluetooth/test/bluetooth_test_cast.cc",
244 "bluetooth/test/bluetooth_test_cast.h",
Stephen Lanham1316af42018-04-04 01:26:28245 ]
Stephen Lanhamccd5c252018-04-10 04:21:56246
247 deps += [
248 "//chromecast/device/bluetooth:util",
249 "//chromecast/device/bluetooth/le",
Bailey Forrestfda35092018-05-16 00:30:44250 "//chromecast/device/bluetooth/le:test_support",
Stephen Lanhamccd5c252018-04-10 04:21:56251 "//chromecast/device/bluetooth/shlib:mock_shlib",
252 ]
253 } else {
254 # BLE discovery: works on Linux.
255 sources += [ "fido/fido_ble_discovery_unittest.cc" ]
Stephen Lanham1316af42018-04-04 01:26:28256 }
Pavel Kalinnikov9f6591002017-11-01 22:09:18257 }
258
tfarinacdc7e5d2015-02-23 09:52:24259 if (is_mac) {
krstnmnlsn332a71cf2015-07-17 18:59:58260 deps += [ "//third_party/ocmock" ]
261 ldflags = [ "-ObjC" ]
rsesekdbb69c72016-05-11 17:26:35262 libs = [
263 "IOBluetooth.framework",
264 "IOKit.framework",
265 ]
erikchenceb2fff2015-04-27 17:50:54266
267 # In the OSX 10.10 SDK, CoreBluetooth became a top level framework.
268 # Previously, it was nested in IOBluetooth. In order for Chrome to run on
269 # OSes older than OSX 10.10, the top level CoreBluetooth framework must be
270 # weakly linked.
271 if (mac_sdk_version == "10.10") {
scheibdd941ba42015-10-27 05:40:12272 ldflags += [
273 "-weak_framework",
274 "CoreBluetooth",
275 ]
erikchenceb2fff2015-04-27 17:50:54276 }
tfarinacdc7e5d2015-02-23 09:52:24277 }
gogeraldcab31232016-02-03 21:20:33278
279 if (is_win) {
280 sources += [
gogeraldb8c706a2016-02-05 01:07:37281 "bluetooth/bluetooth_classic_win_fake.cc",
282 "bluetooth/bluetooth_classic_win_fake.h",
gogeraldcab31232016-02-03 21:20:33283 "bluetooth/bluetooth_low_energy_win_fake.cc",
284 "bluetooth/bluetooth_low_energy_win_fake.h",
Jan Wilken Doerriecc0bd292018-05-14 12:28:28285 "bluetooth/test/fake_bluetooth_adapter_winrt.cc",
286 "bluetooth/test/fake_bluetooth_adapter_winrt.h",
Jan Wilken Dörried4dc7782018-06-04 09:38:13287 "bluetooth/test/fake_bluetooth_le_advertisement_received_event_args_winrt.cc",
288 "bluetooth/test/fake_bluetooth_le_advertisement_received_event_args_winrt.h",
289 "bluetooth/test/fake_bluetooth_le_advertisement_watcher_winrt.cc",
290 "bluetooth/test/fake_bluetooth_le_advertisement_watcher_winrt.h",
291 "bluetooth/test/fake_bluetooth_le_advertisement_winrt.cc",
292 "bluetooth/test/fake_bluetooth_le_advertisement_winrt.h",
Jan Wilken Doerried9b78b92018-06-18 17:35:43293 "bluetooth/test/fake_bluetooth_le_device_winrt.cc",
294 "bluetooth/test/fake_bluetooth_le_device_winrt.h",
Jan Wilken Doerrie7c0e41dc2018-05-16 08:37:52295 "bluetooth/test/fake_device_information_winrt.cc",
296 "bluetooth/test/fake_device_information_winrt.h",
Jan Wilken Doerried66e0a92018-07-07 10:48:19297 "bluetooth/test/fake_gatt_characteristic_winrt.cc",
298 "bluetooth/test/fake_gatt_characteristic_winrt.h",
299 "bluetooth/test/fake_gatt_characteristics_result_winrt.cc",
300 "bluetooth/test/fake_gatt_characteristics_result_winrt.h",
Jan Wilken Doerried9b78b92018-06-18 17:35:43301 "bluetooth/test/fake_gatt_device_service_winrt.cc",
302 "bluetooth/test/fake_gatt_device_service_winrt.h",
303 "bluetooth/test/fake_gatt_device_services_result_winrt.cc",
304 "bluetooth/test/fake_gatt_device_services_result_winrt.h",
Jan Wilken Dörriedc7c81c2018-06-12 07:34:38305 "bluetooth/test/fake_radio_winrt.cc",
306 "bluetooth/test/fake_radio_winrt.h",
gogeraldcab31232016-02-03 21:20:33307 ]
308 }
bajones7ab52ec32016-08-19 19:54:25309
Bill Orr1862b4f2018-05-10 17:56:45310 if (enable_vr) {
Michael Thiessen21e56152017-10-16 18:55:17311 sources += [
Anna Maria114d35052017-12-08 23:13:29312 "vr/orientation/orientation_device_provider_unittest.cc",
313 "vr/orientation/orientation_device_unittest.cc",
Michael Thiessen21e56152017-10-16 18:55:17314 "vr/vr_device_base_unittest.cc",
315 "vr/vr_display_impl_unittest.cc",
316 ]
bajones7ab52ec32016-08-19 19:54:25317
Bill Orr1862b4f2018-05-10 17:56:45318 if (is_android) {
319 deps += [ "//device/vr:java" ]
320 }
321
322 defines = [ "DEVICE_VR_IMPLEMENTATION" ]
323
bajones7ab52ec32016-08-19 19:54:25324 deps += [
325 "//device/vr",
326 "//device/vr:fakes",
Reilly Grantfa93b142018-02-01 02:13:48327 "//device/vr/public/mojom",
Anna Maria114d35052017-12-08 23:13:29328 "//services/device/public/cpp/generic_sensor",
329 "//ui/display",
Roman Karasev72254172018-04-05 18:10:03330 "//ui/display:test_support",
bajones7ab52ec32016-08-19 19:54:25331 ]
332 }
tfarinacdc7e5d2015-02-23 09:52:24333}
scheib56010cc2015-06-25 01:29:47334
Ke He624b52d2017-11-09 13:45:09335source_set("usb_test_gadget") {
336 testonly = true
337
338 sources = [
339 "test/usb_test_gadget.h",
340 "test/usb_test_gadget_impl.cc",
341 ]
342
343 deps = [
344 "//device/base",
345 "//device/usb",
346 "//net:test_support",
347 ]
348}
349
scheib56010cc2015-06-25 01:29:47350if (is_android) {
Matt Reynolds7c498e52017-12-06 22:06:24351 bluetooth_java_sources_needing_jni = [
352 "bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java",
353 ]
scheib56010cc2015-06-25 01:29:47354
355 generate_jni("bluetooth_test_jni_headers") {
356 sources = bluetooth_java_sources_needing_jni
357 jni_package = "bluetooth"
358 }
359
360 android_library("bluetooth_test_java") {
Shimi Zhang0d7b74af2018-02-08 17:28:02361 testonly = true
scheib56010cc2015-06-25 01:29:47362 java_files = bluetooth_java_sources_needing_jni
363 deps = [
364 "//base:base_java",
ortuno5966ddb2016-07-01 02:07:25365 "//components/location/android:location_java",
scheib56010cc2015-06-25 01:29:47366 "//device/bluetooth:java",
ortunocc9b46d12016-08-25 16:47:23367 "//third_party/android_tools:android_support_annotations_java",
John Budorick2d7e42f2018-06-27 02:33:57368 "//third_party/android_tools:android_test_mock_java",
scheib56010cc2015-06-25 01:29:47369 ]
ortunocc9b46d12016-08-25 16:47:23370
371 srcjar_deps = [ ":bluetooth_test_javagen" ]
scheib56010cc2015-06-25 01:29:47372 }
bajonesb9bb4c42016-07-07 00:10:51373
374 junit_binary("device_junit_tests") {
Ke Heb5d9935c2018-06-15 02:50:44375 java_files = [ "gamepad/android/junit/src/org/chromium/device/gamepad/GamepadMappingsTest.java" ]
bajonesb9bb4c42016-07-07 00:10:51376 deps = [
mcasas649deb52017-04-28 01:55:52377 "$google_play_services_package:google_play_services_base_java",
378 "$google_play_services_package:google_play_services_basement_java",
379 "$google_play_services_package:google_play_services_location_java",
bajonesb9bb4c42016-07-07 00:10:51380 "//base:base_java",
381 "//base:base_java_test_support",
Andrew Grieve916bc9b2018-02-02 01:38:59382 "//base:base_junit_test_support",
bajonesb9bb4c42016-07-07 00:10:51383 "//device/gamepad:java",
alexander.shalamov55ac6a4c2016-11-30 09:04:17384 "//mojo/public/java:bindings_java",
peconn2e675b52016-08-01 15:56:19385 "//third_party/android_tools:android_support_annotations_java",
bajonesb9bb4c42016-07-07 00:10:51386 ]
387 srcjar_deps = [ "//device/gamepad:java_enums_srcjar" ]
388 }
ortunocc9b46d12016-08-25 16:47:23389
390 java_cpp_enum("bluetooth_test_javagen") {
391 sources = [
392 "bluetooth/test/bluetooth_test.h",
393 ]
394 }
scheib56010cc2015-06-25 01:29:47395}