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

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

Issue 2641133003: Bluetooth: macOS: Adding counter for service discovery callbacks. (Closed)
Patch Set: Adding comment Created 3 years, 9 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/test/mock_bluetooth_cbperipheral_mac.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/test/mock_bluetooth_cbperipheral_mac.mm
diff --git a/device/bluetooth/test/mock_bluetooth_cbperipheral_mac.mm b/device/bluetooth/test/mock_bluetooth_cbperipheral_mac.mm
index a11a11ba5ddcda7c04fd1e30664aa8673f009963..637ffee454fcbe6a996799fb5a9edb35bf0d8c49 100644
--- a/device/bluetooth/test/mock_bluetooth_cbperipheral_mac.mm
+++ b/device/bluetooth/test/mock_bluetooth_cbperipheral_mac.mm
@@ -83,11 +83,13 @@ using base::scoped_nsobject;
if (_bluetoothTestMac) {
_bluetoothTestMac->OnFakeBluetoothServiceDiscovery();
}
- [_delegate peripheral:self.peripheral didDiscoverServices:nil];
}
- (void)discoverCharacteristics:(NSArray*)characteristics
forService:(CBService*)service {
+ if (_bluetoothTestMac) {
+ _bluetoothTestMac->OnFakeBluetoothCharacteristicDiscovery();
+ }
}
- (void)discoverDescriptorsForCharacteristic:(CBCharacteristic*)characteristic {
@@ -139,8 +141,12 @@ using base::scoped_nsobject;
[self didModifyServices:@[ serviceToRemove ]];
}
-- (void)mockDidDiscoverEvents {
+- (void)mockDidDiscoverServices {
[_delegate peripheral:self.peripheral didDiscoverServices:nil];
+}
+
+- (void)mockDidDiscoverEvents {
+ [self mockDidDiscoverServices];
// BluetoothLowEnergyDeviceMac is expected to call
// -[CBPeripheral discoverCharacteristics:forService:] for each services,
// so -[<CBPeripheralDelegate peripheral:didDiscoverCharacteristicsForService:
« no previous file with comments | « device/bluetooth/test/mock_bluetooth_cbperipheral_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698