| # Copyright 2014 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//testing/test.gni") |
| |
| assert(is_chromeos, "ProximityAuth is Chrome OS only") |
| |
| 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_local_state_pref_manager.cc", |
| "proximity_auth_local_state_pref_manager.h", |
| "proximity_auth_pref_manager.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", |
| "screenlock_state.cc", |
| "screenlock_state.h", |
| "smart_lock_metrics_recorder.cc", |
| "smart_lock_metrics_recorder.h", |
| "unlock_manager.h", |
| "unlock_manager_impl.cc", |
| "unlock_manager_impl.h", |
| ] |
| |
| deps = [ |
| "//base", |
| "//chromeos/components/multidevice", |
| "//chromeos/components/multidevice/logging", |
| "//chromeos/components/proximity_auth/public/mojom", |
| "//chromeos/constants", |
| "//chromeos/dbus/power", |
| "//chromeos/dbus/session_manager", |
| "//chromeos/services/multidevice_setup/public/cpp", |
| "//chromeos/services/multidevice_setup/public/cpp:prefs", |
| "//chromeos/services/secure_channel/public/cpp/client", |
| "//chromeos/services/secure_channel/public/mojom", |
| "//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/components/multidevice", |
| "//chromeos/components/multidevice:test_support", |
| "//chromeos/components/multidevice/logging", |
| "//chromeos/services/device_sync/proto", |
| "//chromeos/services/secure_channel:test_support", |
| "//chromeos/services/secure_channel/public/cpp/client", |
| "//testing/gmock", |
| ] |
| } |
| |
| source_set("unit_tests") { |
| testonly = true |
| sources = [ |
| "messenger_impl_unittest.cc", |
| "proximity_auth_local_state_pref_manager_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", |
| ] |
| |
| configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| |
| deps = [ |
| ":proximity_auth", |
| ":test_support", |
| "//base", |
| "//base/test:test_support", |
| "//chromeos/components/multidevice", |
| "//chromeos/components/multidevice:test_support", |
| "//chromeos/components/multidevice/logging", |
| "//chromeos/constants", |
| "//chromeos/dbus/power", |
| "//chromeos/dbus/power:power_manager_proto", |
| "//chromeos/services/multidevice_setup/public/cpp:prefs", |
| "//chromeos/services/multidevice_setup/public/cpp:test_support", |
| "//chromeos/services/secure_channel:test_support", |
| "//chromeos/services/secure_channel/public/cpp/client:test_support", |
| "//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", |
| ] |
| } |