# Copyright 2014 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/test.gni")
assert(is_chromeos_ash, "Non-Chrome-OS builds must not depend on //ash")
static_library("proximity_auth") {
sources = [
"messenger.h",
"messenger_impl.cc",
"messenger_impl.h",
"messenger_observer.h",
"metrics.cc",
"metrics.h",
"proximity_auth_client.h",
"proximity_auth_pref_names.cc",
"proximity_auth_pref_names.h",
"proximity_auth_profile_pref_manager.cc",
"proximity_auth_profile_pref_manager.h",
"proximity_auth_system.cc",
"proximity_auth_system.h",
"proximity_monitor.cc",
"proximity_monitor.h",
"proximity_monitor_impl.cc",
"proximity_monitor_impl.h",
"proximity_monitor_observer.h",
"remote_device_life_cycle.cc",
"remote_device_life_cycle.h",
"remote_device_life_cycle_impl.cc",
"remote_device_life_cycle_impl.h",
"remote_status_update.cc",
"remote_status_update.h",
"screenlock_bridge.cc",
"screenlock_bridge.h",
"smart_lock_metrics_recorder.cc",
"smart_lock_metrics_recorder.h",
"unlock_manager.h",
"unlock_manager_impl.cc",
"unlock_manager_impl.h",
]
deps = [
"//ash/constants",
"//ash/public/cpp",
"//base",
"//chromeos/ash/components/dbus/session_manager",
"//chromeos/ash/components/multidevice",
"//chromeos/ash/components/multidevice/logging",
"//chromeos/ash/components/proximity_auth/public/mojom",
"//chromeos/ash/services/multidevice_setup/public/cpp",
"//chromeos/ash/services/multidevice_setup/public/cpp:prefs",
"//chromeos/ash/services/secure_channel/public/cpp/client",
"//chromeos/ash/services/secure_channel/public/mojom",
"//chromeos/dbus/power",
"//components/account_id",
"//components/pref_registry:pref_registry",
"//components/prefs",
"//device/bluetooth",
"//net",
]
}
static_library("test_support") {
testonly = true
sources = [
"fake_lock_handler.cc",
"fake_lock_handler.h",
"fake_remote_device_life_cycle.cc",
"fake_remote_device_life_cycle.h",
"mock_proximity_auth_client.cc",
"mock_proximity_auth_client.h",
]
public_deps = [ ":proximity_auth" ]
deps = [
"//base",
"//chromeos/ash/components/multidevice",
"//chromeos/ash/components/multidevice:test_support",
"//chromeos/ash/components/multidevice/logging",
"//chromeos/ash/services/device_sync/proto",
"//chromeos/ash/services/secure_channel:test_support",
"//chromeos/ash/services/secure_channel/public/cpp/client",
"//testing/gmock",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"messenger_impl_unittest.cc",
"proximity_auth_profile_pref_manager_unittest.cc",
"proximity_auth_system_unittest.cc",
"proximity_monitor_impl_unittest.cc",
"remote_device_life_cycle_impl_unittest.cc",
"remote_status_update_unittest.cc",
"unlock_manager_impl_unittest.cc",
]
deps = [
":proximity_auth",
":test_support",
"//ash/constants",
"//ash/public/cpp",
"//base",
"//base/test:test_support",
"//chromeos/ash/components/multidevice",
"//chromeos/ash/components/multidevice:test_support",
"//chromeos/ash/components/multidevice/logging",
"//chromeos/ash/services/multidevice_setup/public/cpp:prefs",
"//chromeos/ash/services/multidevice_setup/public/cpp:test_support",
"//chromeos/ash/services/secure_channel:test_support",
"//chromeos/ash/services/secure_channel/public/cpp/client:test_support",
"//chromeos/dbus/power",
"//chromeos/dbus/power:power_manager_proto",
"//components/prefs:test_support",
"//components/sync_preferences:test_support",
"//device/bluetooth:mocks",
"//testing/gmock",
"//testing/gtest",
]
}
# Note: This is a convenience target for ease of rapid iteration during
# development. It is not executed on any try or build bots.
test("proximity_auth_unittests") {
sources = [ "run_all_unittests.cc" ]
deps = [
":unit_tests",
"//base",
"//base/test:test_support",
]
}