Removed a line that dispatches the 'cancelOverlay' event. This line was added by...
[chromium-blink-merge.git] / device / BUILD.gn
blob3bf6fa77878d31482b8f299773bb4a027d5cba20
1 # 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.
5 import("//build/config/features.gni")
6 import("//testing/test.gni")
8 is_linux_without_udev = is_linux && !use_udev
9 is_linux_without_dbus = is_linux && !use_dbus
11 test("device_unittests") {
12   sources = [
13     "battery/battery_status_manager_win_unittest.cc",
14     "battery/battery_status_service_unittest.cc",
15     "bluetooth/bluetooth_adapter_mac_unittest.mm",
16     "bluetooth/bluetooth_adapter_profile_chromeos_unittest.cc",
17     "bluetooth/bluetooth_adapter_unittest.cc",
18     "bluetooth/bluetooth_adapter_win_unittest.cc",
19     "bluetooth/bluetooth_audio_sink_chromeos_unittest.cc",
20     "bluetooth/bluetooth_chromeos_unittest.cc",
21     "bluetooth/bluetooth_device_unittest.cc",
22     "bluetooth/bluetooth_device_win_unittest.cc",
23     "bluetooth/bluetooth_discovery_filter_unittest.cc",
24     "bluetooth/bluetooth_gatt_chromeos_unittest.cc",
25     "bluetooth/bluetooth_low_energy_win_unittest.cc",
26     "bluetooth/bluetooth_service_record_win_unittest.cc",
27     "bluetooth/bluetooth_socket_chromeos_unittest.cc",
28     "bluetooth/bluetooth_task_manager_win_unittest.cc",
29     "bluetooth/bluetooth_uuid_unittest.cc",
30     "nfc/nfc_chromeos_unittest.cc",
31     "nfc/nfc_ndef_record_unittest.cc",
32     "test/run_all_unittests.cc",
33   ]
35   deps = [
36     "//base/test:test_support",
37     "//device/battery",
38     "//device/battery:mojo_bindings",
39     "//device/bluetooth",
40     "//device/nfc",
41     "//mojo/environment:chromium",
42     "//net",
43     "//testing/gmock",
44     "//testing/gtest",
45     "//third_party/mojo/src/mojo/edk/system",
46     "//third_party/mojo/src/mojo/public/cpp/bindings",
47     "//url",
48   ]
50   if (!is_linux_without_dbus && !is_chromeos) {
51     sources += [ "battery/battery_status_manager_linux_unittest.cc" ]
52   }
54   # HID and Serial:
55   # Android doesn't compile.
56   # Linux, requires udev.
57   if (!is_linux_without_udev && !is_android) {
58     sources += [
59       "hid/hid_connection_unittest.cc",
60       "hid/hid_device_filter_unittest.cc",
61       "hid/hid_report_descriptor_unittest.cc",
62       "hid/input_service_linux_unittest.cc",
63       "hid/test_report_descriptors.cc",
64       "hid/test_report_descriptors.h",
65       "serial/data_sink_unittest.cc",
66       "serial/data_source_unittest.cc",
67       "serial/serial_connection_unittest.cc",
68       "serial/serial_service_unittest.cc",
69     ]
70     deps += [
71       "//device/hid",
72       "//device/serial",
73       "//device/serial:test_support",
74     ]
75   }
77   if (use_udev) {
78     sources += [ "udev_linux/udev_unittest.cc" ]
79     deps += [ "//device/udev_linux" ]
80   }
82   # USB does not compile on mobile platforms.
83   if (!is_android && !is_ios) {
84     sources += [
85       "test/usb_test_gadget_impl.cc",
86       "usb/usb_context_unittest.cc",
87       "usb/usb_device_filter_unittest.cc",
88       "usb/usb_device_handle_unittest.cc",
89       "usb/usb_ids_unittest.cc",
90       "usb/usb_service_unittest.cc",
91     ]
92     deps += [
93       "//device/usb",
94       "//third_party/libusb",
95     ]
96   }
98   if (is_chromeos) {
99     configs += [ "//build/config/linux:dbus" ]
101     deps += [
102       "//chromeos",
103       "//chromeos:test_support",
104       "//chromeos:test_support_without_gmock",
105       "//dbus",
106     ]
107   }
109   if (is_posix && !is_android && !is_mac) {
110     libs = [ "rt" ]
111   }
113   if (is_mac) {
114     libs = [ "IOBluetooth.framework" ]
115   }