| Index: device/bluetooth/test/mock_bluetooth_cbdescriptor_mac.mm
|
| diff --git a/device/bluetooth/test/mock_bluetooth_cbdescriptor_mac.mm b/device/bluetooth/test/mock_bluetooth_cbdescriptor_mac.mm
|
| index 9c8512b5142a99d2d765d2fdbfd5099525492e0e..3a2f6152cc760c43c3c70542fa6d4aa04a1216fe 100644
|
| --- a/device/bluetooth/test/mock_bluetooth_cbdescriptor_mac.mm
|
| +++ b/device/bluetooth/test/mock_bluetooth_cbdescriptor_mac.mm
|
| @@ -15,6 +15,7 @@ using base::scoped_nsobject;
|
| // Owner of this instance.
|
| CBCharacteristic* _characteristic;
|
| scoped_nsobject<CBUUID> _UUID;
|
| + scoped_nsobject<NSData> _value;
|
| }
|
| @end
|
|
|
| @@ -50,6 +51,10 @@ using base::scoped_nsobject;
|
| return _UUID.get();
|
| }
|
|
|
| +- (NSData*)value {
|
| + return _value.get();
|
| +}
|
| +
|
| - (CBDescriptor*)descriptor {
|
| return ObjCCast<CBDescriptor>(self);
|
| }
|
| @@ -58,4 +63,19 @@ using base::scoped_nsobject;
|
| return _characteristic;
|
| }
|
|
|
| +- (void)simulateReadWithValue:(id)value error:(NSError*)error {
|
| + _value.reset([value copy]);
|
| + CBPeripheral* peripheral = _characteristic.service.peripheral;
|
| + [peripheral.delegate peripheral:peripheral
|
| + didUpdateValueForDescriptor:self.descriptor
|
| + error:error];
|
| +}
|
| +
|
| +- (void)simulateWriteWithError:(NSError*)error {
|
| + CBPeripheral* peripheral = _characteristic.service.peripheral;
|
| + [peripheral.delegate peripheral:peripheral
|
| + didWriteValueForDescriptor:self.descriptor
|
| + error:error];
|
| +}
|
| +
|
| @end
|
|
|