| Index: device/bluetooth/bluetooth_adapter_unittest.cc
|
| diff --git a/device/bluetooth/bluetooth_adapter_unittest.cc b/device/bluetooth/bluetooth_adapter_unittest.cc
|
| index ffd8467e19a0ed2a9a6ebe29ce92cbd8d482229b..f28db2e6942cd65950572e93f53e5c8745f7d903 100644
|
| --- a/device/bluetooth/bluetooth_adapter_unittest.cc
|
| +++ b/device/bluetooth/bluetooth_adapter_unittest.cc
|
| @@ -621,6 +621,8 @@ TEST_F(BluetoothTest, DiscoverLowEnergyDeviceTwice) {
|
|
|
| #if defined(OS_ANDROID) || defined(OS_MACOSX)
|
| // Discovers a device, and then again with new Service UUIDs.
|
| +// Makes sure we don't create another device when we've found the
|
| +// device in the past.
|
| TEST_F(BluetoothTest, DiscoverLowEnergyDeviceWithUpdatedUUIDs) {
|
| if (!PlatformSupportsLowEnergy()) {
|
| LOG(WARNING) << "Low Energy Bluetooth unavailable, skipping unit test.";
|
| @@ -633,12 +635,6 @@ TEST_F(BluetoothTest, DiscoverLowEnergyDeviceWithUpdatedUUIDs) {
|
| StartLowEnergyDiscoverySession();
|
| BluetoothDevice* device = SimulateLowEnergyDevice(1);
|
|
|
| - // Check the initial UUIDs:
|
| - EXPECT_TRUE(base::ContainsValue(device->GetUUIDs(),
|
| - BluetoothUUID(kTestUUIDGenericAccess)));
|
| - EXPECT_FALSE(base::ContainsValue(device->GetUUIDs(),
|
| - BluetoothUUID(kTestUUIDImmediateAlert)));
|
| -
|
| // Discover same device again with updated UUIDs:
|
| observer.Reset();
|
| SimulateLowEnergyDevice(2);
|
| @@ -647,21 +643,12 @@ TEST_F(BluetoothTest, DiscoverLowEnergyDeviceWithUpdatedUUIDs) {
|
| EXPECT_EQ(1u, adapter_->GetDevices().size());
|
| EXPECT_EQ(device, observer.last_device());
|
|
|
| - // Expect only new UUIDs:
|
| - EXPECT_FALSE(base::ContainsValue(device->GetUUIDs(),
|
| - BluetoothUUID(kTestUUIDGenericAccess)));
|
| - EXPECT_TRUE(base::ContainsValue(device->GetUUIDs(),
|
| - BluetoothUUID(kTestUUIDImmediateAlert)));
|
| -
|
| // Discover same device again with empty UUIDs:
|
| observer.Reset();
|
| SimulateLowEnergyDevice(3);
|
| EXPECT_EQ(0, observer.device_added_count());
|
| EXPECT_EQ(1, observer.device_changed_count());
|
| EXPECT_EQ(1u, adapter_->GetDevices().size());
|
| -
|
| - // Expect no UUIDs:
|
| - EXPECT_EQ(0u, device->GetUUIDs().size());
|
| }
|
| #endif // defined(OS_ANDROID) || defined(OS_MACOSX)
|
|
|
|
|