# Copyright 2021 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/chromeos/ui_mode.gni")
assert(is_chromeos_ash,
"Quick Pair protocols (e.g. Fast Pair) are ash-chrome only")
source_set("scanning") {
sources = [
"fast_pair/fast_pair_discoverable_scanner.h",
"fast_pair/fast_pair_discoverable_scanner_impl.cc",
"fast_pair/fast_pair_discoverable_scanner_impl.h",
"fast_pair/fast_pair_not_discoverable_scanner.h",
"fast_pair/fast_pair_not_discoverable_scanner_impl.cc",
"fast_pair/fast_pair_not_discoverable_scanner_impl.h",
"fast_pair/fast_pair_scanner.h",
"fast_pair/fast_pair_scanner_impl.cc",
"fast_pair/fast_pair_scanner_impl.h",
"scanner_broker.h",
"scanner_broker_impl.cc",
"scanner_broker_impl.h",
]
deps = [
"//ash/constants",
"//ash/public/cpp",
"//ash/quick_pair/common",
"//ash/quick_pair/fast_pair_handshake",
"//ash/quick_pair/repository",
"//base",
"//chromeos/ash/components/network",
"//chromeos/ash/services/quick_pair",
"//chromeos/ash/services/quick_pair/public/cpp",
"//components/cross_device/logging:logging",
"//components/cross_device/logging:logging",
"//device/bluetooth",
"//device/bluetooth/public/cpp",
]
}
static_library("test_support") {
testonly = true
sources = [
"fast_pair/fake_fast_pair_scanner.cc",
"fast_pair/fake_fast_pair_scanner.h",
"fast_pair/fast_pair_scanner.h",
"mock_scanner_broker.cc",
"mock_scanner_broker.h",
"scanner_broker.h",
]
deps = [
"//ash/quick_pair/common",
"//base",
"//base/test:test_support",
"//device/bluetooth",
"//testing/gtest",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"fast_pair/fast_pair_discoverable_scanner_impl_unittest.cc",
"fast_pair/fast_pair_not_discoverable_scanner_impl_unittest.cc",
"fast_pair/fast_pair_scanner_impl_unittest.cc",
"scanner_broker_impl_unittest.cc",
]
deps = [
":scanning",
":test_support",
"//ash:test_support",
"//ash/constants",
"//ash/quick_pair/common",
"//ash/quick_pair/common:test_support",
"//ash/quick_pair/fast_pair_handshake",
"//ash/quick_pair/proto:fastpair_proto",
"//ash/quick_pair/repository:repository",
"//ash/quick_pair/repository:test_support",
"//base/test:test_support",
"//chromeos/ash/components/network:test_support",
"//chromeos/ash/services/quick_pair",
"//chromeos/ash/services/quick_pair:test_support",
"//dbus:test_support",
"//device/bluetooth",
"//device/bluetooth:mocks",
"//mojo/public/cpp/bindings",
"//testing/gtest",
]
}