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

Unified Diff: device/bluetooth/test/mock_bluetooth_cbcharacteristic_mac.mm

Issue 2638653002: Bluetooth: macOS: DidModifyServices can happens while scanning (Closed)
Patch Set: Merge Created 3 years, 7 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/test/mock_bluetooth_cbcharacteristic_mac.mm
diff --git a/device/bluetooth/test/mock_bluetooth_cbcharacteristic_mac.mm b/device/bluetooth/test/mock_bluetooth_cbcharacteristic_mac.mm
index 1cf1d1838cf7e6c26e80b915afbc2ab6222bf371..0a27de208d17045aa440958e7813da728eb26ab5 100644
--- a/device/bluetooth/test/mock_bluetooth_cbcharacteristic_mac.mm
+++ b/device/bluetooth/test/mock_bluetooth_cbcharacteristic_mac.mm
@@ -94,8 +94,7 @@ CBCharacteristicProperties GattCharacteristicPropertyToCBCharacteristicProperty(
CBService* _service;
scoped_nsobject<CBUUID> _UUID;
CBCharacteristicProperties _cb_properties;
- scoped_nsobject<NSMutableArray> _simulatedDescriptors;
- scoped_nsobject<NSArray> _descriptors;
+ scoped_nsobject<NSMutableArray> _descriptors;
scoped_nsobject<NSObject> _value;
BOOL _notifying;
}
@@ -113,7 +112,7 @@ CBCharacteristicProperties GattCharacteristicPropertyToCBCharacteristicProperty(
_cb_properties =
device::GattCharacteristicPropertyToCBCharacteristicProperty(
properties);
- _simulatedDescriptors.reset([[NSMutableArray alloc] init]);
+ _descriptors.reset([[NSMutableArray alloc] init]);
}
return self;
}
@@ -189,15 +188,11 @@ CBCharacteristicProperties GattCharacteristicPropertyToCBCharacteristicProperty(
error:nil];
}
-- (void)simulateDescriptorWithUUID:(CBUUID*)uuid {
+- (void)addDescriptorWithUUID:(CBUUID*)uuid {
scoped_nsobject<MockCBDescriptor> descriptor_mock([[MockCBDescriptor alloc]
initWithCharacteristic:self.characteristic
CBUUID:uuid]);
- [_simulatedDescriptors.get() addObject:descriptor_mock];
-}
-
-- (void)discoverDescriptors {
- _descriptors.reset([_simulatedDescriptors copy]);
+ [_descriptors.get() addObject:descriptor_mock];
}
- (CBUUID*)UUID {
« no previous file with comments | « device/bluetooth/test/mock_bluetooth_cbcharacteristic_mac.h ('k') | device/bluetooth/test/mock_bluetooth_cbperipheral_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698