# Copyright 2018 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//chromecast/chromecast.gni")
import("//testing/libfuzzer/fuzzer_test.gni")
cast_source_set("le") {
public = [
"ble_notification_logger.h",
"ble_types.h",
"gatt_client_manager.h",
"le_scan_manager.h",
"le_scan_result.h",
"remote_characteristic.h",
"remote_descriptor.h",
"remote_device.h",
"remote_service.h",
"scan_filter.h",
]
sources = [
"ble_notification_logger.cc",
"le_scan_result.cc",
"remote_descriptor.cc",
"scan_filter.cc",
]
public_deps = [
"//base",
"//chromecast/public",
]
deps = [
"//chromecast/base",
"//chromecast/device/bluetooth:util",
"//third_party/re2",
]
}
cast_source_set("le_impl") {
sources = [
"gatt_client_manager_impl.cc",
"gatt_client_manager_impl.h",
"le_scan_manager_impl.cc",
"le_scan_manager_impl.h",
"remote_characteristic_impl.cc",
"remote_characteristic_impl.h",
"remote_descriptor_impl.cc",
"remote_descriptor_impl.h",
"remote_device_impl.cc",
"remote_device_impl.h",
"remote_service_impl.cc",
"remote_service_impl.h",
]
deps = [
":le",
"//base",
"//chromecast/base",
"//chromecast/device/bluetooth:util",
"//chromecast/device/bluetooth/shlib",
"//chromecast/public",
]
}
cast_source_set("test_support") {
testonly = true
sources = [
"mock_gatt_client_manager.cc",
"mock_gatt_client_manager.h",
"mock_le_scan_manager.cc",
"mock_le_scan_manager.h",
"mock_remote_characteristic.cc",
"mock_remote_characteristic.h",
"mock_remote_descriptor.cc",
"mock_remote_descriptor.h",
"mock_remote_device.cc",
"mock_remote_device.h",
"mock_remote_service.cc",
"mock_remote_service.h",
]
deps = [
":le",
"//base",
"//chromecast/public",
"//testing/gmock",
]
}
cast_source_set("unittests") {
testonly = true
sources = [
"gatt_client_manager_impl_test.cc",
"instantiate_mocks.cc",
"le_scan_manager_impl_test.cc",
"le_scan_result_test.cc",
"scan_filter_test.cc",
]
deps = [
":le",
":le_impl",
":test_support",
"//base",
"//base/test:test_support",
"//chromecast/device/bluetooth:util",
"//chromecast/device/bluetooth/shlib:mock_shlib",
"//chromecast/public",
"//testing/gmock",
"//testing/gtest",
]
}
fuzzer_test("le_scan_result_fuzzer") {
sources = [ "le_scan_result_fuzzer.cc" ]
deps = [ ":le" ]
}