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

Unified Diff: components/proximity_auth/ble/bluetooth_low_energy_connection_finder_unittest.cc

Issue 2244693002: bluetooth: Refactor how we update based on Advertising Data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Typo Created 4 years, 4 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/ble/bluetooth_low_energy_connection_finder_unittest.cc
diff --git a/components/proximity_auth/ble/bluetooth_low_energy_connection_finder_unittest.cc b/components/proximity_auth/ble/bluetooth_low_energy_connection_finder_unittest.cc
index ec7cca152601c31007d934a6cfd0b06580355531..93a961044b1d7e44ed27080bbe556d4edd00cfe1 100644
--- a/components/proximity_auth/ble/bluetooth_low_energy_connection_finder_unittest.cc
+++ b/components/proximity_auth/ble/bluetooth_low_energy_connection_finder_unittest.cc
@@ -37,6 +37,8 @@ using testing::Return;
using testing::StrictMock;
using testing::SaveArg;
+using device::BluetoothDevice;
+
namespace proximity_auth {
namespace {
@@ -164,8 +166,7 @@ class ProximityAuthBluetoothLowEnergyConnectionFinderTest
void PrepareDevice(const std::string& uuid,
const std::string& address,
bool paired) {
- std::vector<device::BluetoothUUID> uuids;
- uuids.push_back(device::BluetoothUUID(uuid));
+ BluetoothDevice::UUIDSet uuids = {device::BluetoothUUID(uuid)};
ON_CALL(*device_, GetUUIDs()).WillByDefault(Return(uuids));
ON_CALL(*device_, GetAddress()).WillByDefault(Return(address));
ON_CALL(*device_, IsPaired()).WillByDefault(Return(paired));
@@ -238,7 +239,7 @@ TEST_F(ProximityAuthBluetoothLowEnergyConnectionFinderTest,
FindAndExpectStartDiscovery(connection_finder);
ExpectRemoveObserver();
- std::vector<device::BluetoothUUID> uuids;
+ BluetoothDevice::UUIDSet uuids;
ON_CALL(*device_, GetUUIDs()).WillByDefault(Return(uuids));
ON_CALL(*device_, IsPaired()).WillByDefault(Return(true));
ON_CALL(*device_whitelist_, HasDeviceWithAddress(_))
@@ -344,8 +345,8 @@ TEST_F(ProximityAuthBluetoothLowEnergyConnectionFinderTest,
NiceMock<device::MockBluetoothDevice> other_device(
adapter_.get(), 0, kTestRemoteDeviceName,
kTestRemoteDeviceBluetoothAddress, false, false);
- std::vector<device::BluetoothUUID> uuids;
- uuids.push_back(device::BluetoothUUID(kServiceUUID));
+ BluetoothDevice::UUIDSet uuids;
+ uuids.insert(device::BluetoothUUID(kServiceUUID));
Jeffrey Yasskin 2016/08/19 22:08:10 {} here too.
ortuno 2016/08/23 00:38:04 Done.
ON_CALL(other_device, GetAddress())
.WillByDefault(Return(kTestRemoteDeviceBluetoothAddress));
ON_CALL(other_device, IsPaired()).WillByDefault(Return(true));

Powered by Google App Engine
This is Rietveld 408576698