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

Unified Diff: components/proximity_auth/remote_device_life_cycle_impl_unittest.cc

Issue 1356943004: Add RemoteDeviceLoader to create RemoteDevice from CryptAuth data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webui
Patch Set: move RemoteDevice creation in tests to util function Created 5 years, 3 months 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/proximity_auth/remote_device_life_cycle_impl_unittest.cc
diff --git a/components/proximity_auth/remote_device_life_cycle_impl_unittest.cc b/components/proximity_auth/remote_device_life_cycle_impl_unittest.cc
index ade8caf2951f96c9b5efba070f0ad2a937c45a9c..65d86131e927c76dbcf3ee7fee1e79934960be10 100644
--- a/components/proximity_auth/remote_device_life_cycle_impl_unittest.cc
+++ b/components/proximity_auth/remote_device_life_cycle_impl_unittest.cc
@@ -12,6 +12,7 @@
#include "components/proximity_auth/connection_finder.h"
#include "components/proximity_auth/fake_connection.h"
#include "components/proximity_auth/messenger.h"
+#include "components/proximity_auth/proximity_auth_test_util.h"
#include "components/proximity_auth/secure_context.h"
#include "components/proximity_auth/wire_message.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -27,12 +28,6 @@ namespace proximity_auth {
namespace {
-// Attributes of the remote device under test.
-const char kRemoteDeviceName[] = "remote device";
-const char kRemoteDevicePublicKey[] = "public key";
-const char kRemoteDeviceBluetoothAddress[] = "AA:BB:CC:DD:EE:FF";
-const char kRemoteDevicePSK[] = "remote device psk";
-
class StubSecureContext : public SecureContext {
public:
StubSecureContext() {}
@@ -154,10 +149,7 @@ class ProximityAuthRemoteDeviceLifeCycleImplTest
public RemoteDeviceLifeCycle::Observer {
protected:
ProximityAuthRemoteDeviceLifeCycleImplTest()
- : life_cycle_(RemoteDevice(kRemoteDeviceName,
- kRemoteDevicePublicKey,
- kRemoteDeviceBluetoothAddress,
- kRemoteDevicePSK)),
+ : life_cycle_(CreateClassicRemoteDeviceForTest()),
task_runner_(new base::TestSimpleTaskRunner()),
thread_task_runner_handle_(task_runner_) {}
« no previous file with comments | « components/proximity_auth/remote_device_life_cycle_impl.cc ('k') | components/proximity_auth/remote_device_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698