Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Unified Diff: components/cryptauth/cryptauth_test_util.h

Issue 2561203002: Migrate weave-related classes from proximity_auth/ble to cryptauth/ble. (Closed)
Patch Set: Rebase. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/cryptauth/cryptauth_test_util.h
diff --git a/components/cryptauth/cryptauth_test_util.h b/components/cryptauth/cryptauth_test_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..32a0d038d9be201e15e33336ab8dccbce3693413
--- /dev/null
+++ b/components/cryptauth/cryptauth_test_util.h
@@ -0,0 +1,39 @@
+// Copyright 2015 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.
+
+#ifndef COMPONENTS_CRYPTAUTH_CRYPTAUTH_TEST_UTIL_H
+#define COMPONENTS_CRYPTAUTH_CRYPTAUTH_TEST_UTIL_H
+
+#include "components/cryptauth/remote_device.h"
+
+namespace cryptauth {
+
+// Attributes of the default test remote device.
+extern const char kTestRemoteDeviceUserId[];
+extern const char kTestRemoteDeviceName[];
+extern const char kTestRemoteDevicePublicKey[];
+extern const char kTestRemoteDeviceBluetoothAddress[];
+extern const char kTestRemoteDevicePSK[];
+extern const char kTestRemoteDeviceSignInChallenge[];
+
+// Returns a BLE RemoteDevice used for tests.
+inline RemoteDevice CreateLERemoteDeviceForTest() {
+ return RemoteDevice(kTestRemoteDeviceUserId, kTestRemoteDeviceName,
+ kTestRemoteDevicePublicKey, RemoteDevice::BLUETOOTH_LE,
+ kTestRemoteDeviceBluetoothAddress, kTestRemoteDevicePSK,
+ kTestRemoteDeviceSignInChallenge);
+}
+
+// Returns a classic Bluetooth RemoteDevice used for tests.
+inline RemoteDevice CreateClassicRemoteDeviceForTest() {
+ return RemoteDevice(kTestRemoteDeviceUserId, kTestRemoteDeviceName,
+ kTestRemoteDevicePublicKey,
+ RemoteDevice::BLUETOOTH_CLASSIC,
+ kTestRemoteDeviceBluetoothAddress, kTestRemoteDevicePSK,
+ kTestRemoteDeviceSignInChallenge);
+}
+
+} // namespace cryptauth
+
+#endif // COMPONENTS_CRYPTAUTH_CRYPTAUTH_TEST_UTIL_H

Powered by Google App Engine
This is Rietveld 408576698