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

Unified Diff: device/bluetooth/bluetooth_device_unittest.cc

Issue 2638653002: Bluetooth: macOS: DidModifyServices can happens while scanning (Closed)
Patch Set: Removing useless modification Created 3 years, 8 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: device/bluetooth/bluetooth_device_unittest.cc
diff --git a/device/bluetooth/bluetooth_device_unittest.cc b/device/bluetooth/bluetooth_device_unittest.cc
index ab478fc7386df4a49d9bf91a0645488354e48239..9e142f75fc028456e0dfa42ae399312eebfec028 100644
--- a/device/bluetooth/bluetooth_device_unittest.cc
+++ b/device/bluetooth/bluetooth_device_unittest.cc
@@ -465,7 +465,8 @@ TEST_F(BluetoothTest, TwoPendingServiceDiscoveryRequests) {
// Fist system call to
// -[id<CBPeripheralDelegate> peripheral:didDiscoverServices:]
observer.Reset();
- SimulateDidDiscoverServices(device, {kTestUUIDHeartRate});
+ AddServicesToDevice(device, {kTestUUIDHeartRate});
+ SimulateDidDiscoverServices(device);
EXPECT_EQ(0, observer.device_changed_count());
EXPECT_FALSE(device->IsGattServicesDiscoveryComplete());
EXPECT_EQ(gatt_characteristic_discovery_attempts_, 0);
@@ -513,7 +514,8 @@ TEST_F(BluetoothTest, ExtraDidDiscoverServicesCall) {
// Unexpected system call to
// -[id<CBPeripheralDelegate> peripheral:didDiscoverServices:]
- SimulateDidDiscoverServices(device, {kTestUUIDImmediateAlert});
+ AddServicesToDevice(device, {kTestUUIDImmediateAlert});
+ SimulateDidDiscoverServices(device);
EXPECT_EQ(1, observer.device_changed_count());
EXPECT_TRUE(device->IsGattServicesDiscoveryComplete());

Powered by Google App Engine
This is Rietveld 408576698