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

Unified Diff: components/proximity_auth/proximity_monitor_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
« no previous file with comments | « components/proximity_auth/proximity_auth_test_util.cc ('k') | components/proximity_auth/remote_device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/proximity_auth/proximity_monitor_impl_unittest.cc
diff --git a/components/proximity_auth/proximity_monitor_impl_unittest.cc b/components/proximity_auth/proximity_monitor_impl_unittest.cc
index 12f74ed15b9f741a2d363e589efa1396a34a953d..1eb2a9552d2e14b2cae6291fed4db33393d94fa8 100644
--- a/components/proximity_auth/proximity_monitor_impl_unittest.cc
+++ b/components/proximity_auth/proximity_monitor_impl_unittest.cc
@@ -29,6 +29,7 @@ using testing::SaveArg;
namespace proximity_auth {
namespace {
+const char kRemoteDeviceUserId[] = "example@gmail.com";
const char kBluetoothAddress[] = "AA:BB:CC:DD:EE:FF";
const char kRemoteDevicePublicKey[] = "Remote Public Key";
const char kRemoteDeviceName[] = "LGE Nexus 5";
@@ -82,10 +83,13 @@ class ProximityAuthProximityMonitorImplTest : public testing::Test {
kBluetoothAddress,
false /* paired */,
true /* connected */),
- monitor_(RemoteDevice(kRemoteDeviceName,
+ monitor_(RemoteDevice(kRemoteDeviceUserId,
+ kRemoteDeviceName,
kRemoteDevicePublicKey,
+ RemoteDevice::BLUETOOTH_CLASSIC,
kBluetoothAddress,
- kPersistentSymmetricKey),
+ kPersistentSymmetricKey,
+ std::string()),
make_scoped_ptr(clock_),
&observer_),
task_runner_(new base::TestSimpleTaskRunner()),
@@ -534,9 +538,10 @@ TEST_F(ProximityAuthProximityMonitorImplTest,
RecordProximityMetricsOnAuthSuccess_UnknownValues) {
// Note: A device without a recorded name will have its Bluetooth address as
// its name.
- RemoteDevice unnamed_remote_device(kBluetoothAddress, kRemoteDevicePublicKey,
- kBluetoothAddress,
- kPersistentSymmetricKey);
+ RemoteDevice unnamed_remote_device(
+ kRemoteDeviceUserId, kBluetoothAddress, kRemoteDevicePublicKey,
+ RemoteDevice::BLUETOOTH_CLASSIC, kBluetoothAddress,
+ kPersistentSymmetricKey, std::string());
scoped_ptr<base::TickClock> clock(new base::SimpleTestTickClock());
ProximityMonitorImpl monitor(unnamed_remote_device, clock.Pass(), &observer_);
« no previous file with comments | « components/proximity_auth/proximity_auth_test_util.cc ('k') | components/proximity_auth/remote_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698