| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef COMPONENTS_PROXIMITY_AUTH_PROXIMITY_AUTH_TEST_UTIL_H | |
| 6 #define COMPONENTS_PROXIMITY_AUTH_PROXIMITY_AUTH_TEST_UTIL_H | |
| 7 | |
| 8 #include "components/cryptauth/remote_device.h" | |
| 9 | |
| 10 namespace proximity_auth { | |
| 11 | |
| 12 // Attributes of the default test remote device. | |
| 13 extern const char kTestRemoteDeviceUserId[]; | |
| 14 extern const char kTestRemoteDeviceName[]; | |
| 15 extern const char kTestRemoteDevicePublicKey[]; | |
| 16 extern const char kTestRemoteDeviceBluetoothAddress[]; | |
| 17 extern const char kTestRemoteDevicePSK[]; | |
| 18 extern const char kTestRemoteDeviceSignInChallenge[]; | |
| 19 | |
| 20 // Returns a BLE RemoteDevice used for tests. | |
| 21 inline cryptauth::RemoteDevice CreateLERemoteDeviceForTest() { | |
| 22 return cryptauth::RemoteDevice( | |
| 23 kTestRemoteDeviceUserId, kTestRemoteDeviceName, | |
| 24 kTestRemoteDevicePublicKey, cryptauth::RemoteDevice::BLUETOOTH_LE, | |
| 25 kTestRemoteDeviceBluetoothAddress, kTestRemoteDevicePSK, | |
| 26 kTestRemoteDeviceSignInChallenge); | |
| 27 } | |
| 28 | |
| 29 // Returns a classic Bluetooth RemoteDevice used for tests. | |
| 30 inline cryptauth::RemoteDevice CreateClassicRemoteDeviceForTest() { | |
| 31 return cryptauth::RemoteDevice( | |
| 32 kTestRemoteDeviceUserId, kTestRemoteDeviceName, | |
| 33 kTestRemoteDevicePublicKey, cryptauth::RemoteDevice::BLUETOOTH_CLASSIC, | |
| 34 kTestRemoteDeviceBluetoothAddress, kTestRemoteDevicePSK, | |
| 35 kTestRemoteDeviceSignInChallenge); | |
| 36 } | |
| 37 | |
| 38 } // namespace proximity_auth | |
| 39 | |
| 40 #endif // COMPONENTS_PROXIMITY_AUTH_PROXIMITY_AUTH_TEST_UTIL_H | |
| OLD | NEW |