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

Unified Diff: components/proximity_auth/remote_device_loader_unittest.cc

Issue 2560713002: Move RemoteDevice from //components/proximity_auth to //components/cryptauth so that it can be easi… (Closed)
Patch Set: Add cryptauth dependency. 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/proximity_auth/remote_device_loader_unittest.cc
diff --git a/components/proximity_auth/remote_device_loader_unittest.cc b/components/proximity_auth/remote_device_loader_unittest.cc
index a758331b642ace06341864dbf7b1deb176ecaada..9945ac3c2366495cc09d2a77fe2909abf99b62f7 100644
--- a/components/proximity_auth/remote_device_loader_unittest.cc
+++ b/components/proximity_auth/remote_device_loader_unittest.cc
@@ -61,7 +61,8 @@ class ProximityAuthRemoteDeviceLoaderTest : public testing::Test {
~ProximityAuthRemoteDeviceLoaderTest() {}
- void OnRemoteDevicesLoaded(const std::vector<RemoteDevice>& remote_devices) {
+ void OnRemoteDevicesLoaded(
+ const std::vector<cryptauth::RemoteDevice>& remote_devices) {
remote_devices_ = remote_devices;
LoadCompleted();
}
@@ -78,7 +79,7 @@ class ProximityAuthRemoteDeviceLoaderTest : public testing::Test {
std::string user_private_key_;
// Stores the result of the RemoteDeviceLoader.
- std::vector<RemoteDevice> remote_devices_;
+ std::vector<cryptauth::RemoteDevice> remote_devices_;
// Stores the bluetooth address for BLE devices.
std::unique_ptr<MockProximityAuthPrefManager> pref_manager_;
@@ -92,7 +93,7 @@ TEST_F(ProximityAuthRemoteDeviceLoaderTest, LoadZeroDevices) {
std::move(secure_message_delegate_),
pref_manager_.get());
- std::vector<RemoteDevice> result;
+ std::vector<cryptauth::RemoteDevice> result;
EXPECT_CALL(*this, LoadCompleted());
loader.Load(
base::Bind(&ProximityAuthRemoteDeviceLoaderTest::OnRemoteDevicesLoaded,
@@ -108,7 +109,7 @@ TEST_F(ProximityAuthRemoteDeviceLoaderTest, LoadOneClassicRemoteDevice) {
std::move(secure_message_delegate_),
pref_manager_.get());
- std::vector<RemoteDevice> result;
+ std::vector<cryptauth::RemoteDevice> result;
EXPECT_CALL(*this, LoadCompleted());
loader.Load(
base::Bind(&ProximityAuthRemoteDeviceLoaderTest::OnRemoteDevicesLoaded,
@@ -120,7 +121,8 @@ TEST_F(ProximityAuthRemoteDeviceLoaderTest, LoadOneClassicRemoteDevice) {
EXPECT_EQ(unlock_keys[0].public_key(), remote_devices_[0].public_key);
EXPECT_EQ(unlock_keys[0].bluetooth_address(),
remote_devices_[0].bluetooth_address);
- EXPECT_EQ(RemoteDevice::BLUETOOTH_CLASSIC, remote_devices_[0].bluetooth_type);
+ EXPECT_EQ(cryptauth::RemoteDevice::BLUETOOTH_CLASSIC,
+ remote_devices_[0].bluetooth_type);
}
TEST_F(ProximityAuthRemoteDeviceLoaderTest, LoadOneBLERemoteDevice) {
@@ -135,7 +137,7 @@ TEST_F(ProximityAuthRemoteDeviceLoaderTest, LoadOneBLERemoteDevice) {
EXPECT_CALL(*pref_manager_, GetDeviceAddress(testing::_))
.WillOnce(testing::Return(ble_address));
- std::vector<RemoteDevice> result;
+ std::vector<cryptauth::RemoteDevice> result;
EXPECT_CALL(*this, LoadCompleted());
loader.Load(
base::Bind(&ProximityAuthRemoteDeviceLoaderTest::OnRemoteDevicesLoaded,
@@ -146,7 +148,8 @@ TEST_F(ProximityAuthRemoteDeviceLoaderTest, LoadOneBLERemoteDevice) {
EXPECT_EQ(unlock_keys[0].friendly_device_name(), remote_devices_[0].name);
EXPECT_EQ(unlock_keys[0].public_key(), remote_devices_[0].public_key);
EXPECT_EQ(ble_address, remote_devices_[0].bluetooth_address);
- EXPECT_EQ(RemoteDevice::BLUETOOTH_LE, remote_devices_[0].bluetooth_type);
+ EXPECT_EQ(cryptauth::RemoteDevice::BLUETOOTH_LE,
+ remote_devices_[0].bluetooth_type);
}
TEST_F(ProximityAuthRemoteDeviceLoaderTest, LoadThreeRemoteDevice) {
@@ -158,7 +161,7 @@ TEST_F(ProximityAuthRemoteDeviceLoaderTest, LoadThreeRemoteDevice) {
std::move(secure_message_delegate_),
pref_manager_.get());
- std::vector<RemoteDevice> result;
+ std::vector<cryptauth::RemoteDevice> result;
EXPECT_CALL(*this, LoadCompleted());
loader.Load(
base::Bind(&ProximityAuthRemoteDeviceLoaderTest::OnRemoteDevicesLoaded,

Powered by Google App Engine
This is Rietveld 408576698