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

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: Fix arc 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..f180579724a68815439553cba08e3865485abca1 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,8 @@ 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;
Jeffrey Yasskin 2016/08/18 16:04:32 I believe you can use BluetoothDevice::UUIDSet
ortuno 2016/08/19 20:50:32 Done.
+ uuids.insert(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 +240,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 +346,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));
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