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

Unified Diff: device/bluetooth/bluetooth_adapter_unittest.cc

Issue 1414553004: bluetooth: android: Accumulate advertised UUIDs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bt-i541710-
Patch Set: Fix armansito request, and only report update if UUIDs changed. Created 5 years, 2 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 | « device/bluetooth/bluetooth_adapter_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_adapter_unittest.cc
diff --git a/device/bluetooth/bluetooth_adapter_unittest.cc b/device/bluetooth/bluetooth_adapter_unittest.cc
index 4683582a70dffac18bf4a32e32e400d14952674d..fccb1283b11c49b827e4c339811a066144b27369 100644
--- a/device/bluetooth/bluetooth_adapter_unittest.cc
+++ b/device/bluetooth/bluetooth_adapter_unittest.cc
@@ -546,8 +546,8 @@ TEST_F(BluetoothTest, DiscoverLowEnergyDeviceWithUpdatedUUIDs) {
EXPECT_EQ(1u, adapter_->GetDevices().size());
EXPECT_EQ(device, observer.last_device());
- // Expect new UUIDs:
- EXPECT_FALSE(
+ // Expect new AND old UUIDs:
+ EXPECT_TRUE(
ContainsValue(device->GetUUIDs(), BluetoothUUID(kTestUUIDGenericAccess)));
EXPECT_TRUE(ContainsValue(device->GetUUIDs(),
BluetoothUUID(kTestUUIDImmediateAlert)));
@@ -556,12 +556,16 @@ TEST_F(BluetoothTest, DiscoverLowEnergyDeviceWithUpdatedUUIDs) {
observer.Reset();
DiscoverLowEnergyDevice(3);
EXPECT_EQ(0, observer.device_added_count());
+#if defined(OS_MACOSX)
+ // TODO(scheib): Call DeviceChanged only if UUIDs change. crbug.com/547106
EXPECT_EQ(1, observer.device_changed_count());
+#else
+ EXPECT_EQ(0, observer.device_changed_count());
+#endif
EXPECT_EQ(1u, adapter_->GetDevices().size());
- EXPECT_EQ(device, observer.last_device());
- // Expect empty UUIDs:
- EXPECT_EQ(0u, device->GetUUIDs().size());
+ // Expect all UUIDs:
+ EXPECT_EQ(4u, device->GetUUIDs().size());
}
#endif // defined(OS_ANDROID) || defined(OS_MACOSX)
« no previous file with comments | « device/bluetooth/bluetooth_adapter_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698