| 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 637ffee454fcbe6a996799fb5a9edb35bf0d8c49..f0a4a7338cf17210c78f7401ee488fe5b8baf81d 100644
|
| --- a/device/bluetooth/test/mock_bluetooth_cbperipheral_mac.mm
|
| +++ b/device/bluetooth/test/mock_bluetooth_cbperipheral_mac.mm
|
| @@ -8,6 +8,7 @@
|
| #include "base/mac/scoped_nsobject.h"
|
| #include "device/bluetooth/test/bluetooth_test_mac.h"
|
| #include "device/bluetooth/test/mock_bluetooth_cbcharacteristic_mac.h"
|
| +#include "device/bluetooth/test/mock_bluetooth_cbdescriptor_mac.h"
|
| #include "device/bluetooth/test/mock_bluetooth_cbservice_mac.h"
|
|
|
| using base::mac::ObjCCast;
|
| @@ -112,6 +113,18 @@ using base::scoped_nsobject;
|
| _bluetoothTestMac->OnFakeBluetoothCharacteristicWriteValue(value);
|
| }
|
|
|
| +- (void)readValueForDescriptor:(CBDescriptor*)descriptor {
|
| + DCHECK(_bluetoothTestMac);
|
| + _bluetoothTestMac->OnFakeBluetoothDescriptorReadValue();
|
| +}
|
| +
|
| +- (void)writeValue:(NSData*)data forDescriptor:(CBDescriptor*)descriptor {
|
| + DCHECK(_bluetoothTestMac);
|
| + const uint8_t* buffer = static_cast<const uint8_t*>(data.bytes);
|
| + std::vector<uint8_t> value(buffer, buffer + data.length);
|
| + _bluetoothTestMac->OnFakeBluetoothDescriptorWriteValue(value);
|
| +}
|
| +
|
| - (void)removeAllServices {
|
| [_services.get() removeAllObjects];
|
| }
|
|
|