chromium/ash/quick_pair/pairing/BUILD.gn

# 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")
import("//testing/libfuzzer/fuzzer_test.gni")

assert(is_chromeos_ash,
       "Quick Pair protocols (e.g. Fast Pair) are ash-chrome only")

source_set("pairing") {
  sources = [
    "fast_pair/fast_pair_pairer.h",
    "fast_pair/fast_pair_pairer_impl.cc",
    "fast_pair/fast_pair_pairer_impl.h",
    "pairer_broker.h",
    "pairer_broker_impl.cc",
    "pairer_broker_impl.h",
    "retroactive_pairing_detector.h",
    "retroactive_pairing_detector_impl.cc",
    "retroactive_pairing_detector_impl.h",
  ]

  deps = [
    "//ash/public/cpp",
    "//ash/quick_pair/common",
    "//ash/quick_pair/fast_pair_handshake",
    "//ash/quick_pair/message_stream",
    "//ash/quick_pair/proto:fastpair_proto",
    "//ash/quick_pair/repository",
    "//base",
    "//chromeos/ash/services/quick_pair",
    "//chromeos/ash/services/quick_pair/public/cpp",
    "//components/cross_device/logging:logging",
    "//crypto:crypto",
    "//device/bluetooth",
    "//third_party/protobuf:protobuf_lite",
  ]
}

static_library("test_support") {
  testonly = true

  sources = [
    "fake_retroactive_pairing_detector.cc",
    "fake_retroactive_pairing_detector.h",
    "mock_pairer_broker.cc",
    "mock_pairer_broker.h",
    "pairer_broker.h",
    "retroactive_pairing_detector.h",
  ]

  deps = [
    "//ash/quick_pair/common",
    "//ash/quick_pair/common:test_support",
    "//ash/quick_pair/fast_pair_handshake",
    "//base",
    "//base/test:test_support",
    "//device/bluetooth",
    "//testing/gtest",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "fast_pair/fast_pair_pairer_impl_unittest.cc",
    "pairer_broker_impl_unittest.cc",
    "retroactive_pairing_detector_unittest.cc",
  ]

  deps = [
    ":pairing",
    ":test_support",
    "//ash:test_support",
    "//ash/public/cpp:test_support",
    "//ash/quick_pair/common",
    "//ash/quick_pair/common:test_support",
    "//ash/quick_pair/fast_pair_handshake",
    "//ash/quick_pair/fast_pair_handshake:test_support",
    "//ash/quick_pair/feature_status_tracker",
    "//ash/quick_pair/feature_status_tracker:test_support",
    "//ash/quick_pair/message_stream",
    "//ash/quick_pair/message_stream:test_support",
    "//ash/quick_pair/proto:fastpair_proto",
    "//ash/quick_pair/repository:repository",
    "//ash/quick_pair/repository:test_support",
    "//base",
    "//base/test:test_support",
    "//chromeos/ash/services/quick_pair",
    "//chromeos/ash/services/quick_pair:test_support",
    "//chromeos/ash/services/quick_pair/public/cpp",
    "//device/bluetooth",
    "//device/bluetooth:mocks",
    "//mojo/public/cpp/bindings",
    "//testing/gtest",
  ]
}