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

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

Issue 2634873002: Bluetooth: macOS: Implement BluetoothRemoteGattCharacteristicMac::UnsubscribeFromNotifications (Closed)
Patch Set: Adding last_notify_value for macOS Created 3 years, 10 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/bluetooth_test_mac.mm
diff --git a/device/bluetooth/test/bluetooth_test_mac.mm b/device/bluetooth/test/bluetooth_test_mac.mm
index f0e3b882997d1385fb5915856ad35818a8e37705..eb4bf905e330bb81166f50a4af60aa57b42aeeff 100644
--- a/device/bluetooth/test/bluetooth_test_mac.mm
+++ b/device/bluetooth/test/bluetooth_test_mac.mm
@@ -421,6 +421,22 @@ void BluetoothTestMac::SimulateGattNotifySessionStartError(
[characteristic_mock simulateGattNotifySessionFailedWithError:error];
}
+void BluetoothTestMac::SimulateGattNotifySessionStopped(
+ BluetoothRemoteGattCharacteristic* characteristic) {
+ MockCBCharacteristic* characteristic_mock =
+ GetCBMockCharacteristic(characteristic);
+ [characteristic_mock simulateGattNotifySessionStopped];
+}
+
+void BluetoothTestMac::SimulateGattNotifySessionStopError(
+ BluetoothRemoteGattCharacteristic* characteristic,
+ BluetoothRemoteGattService::GattErrorCode error_code) {
+ MockCBCharacteristic* characteristic_mock =
+ GetCBMockCharacteristic(characteristic);
+ NSError* error = BluetoothDeviceMac::GetNSErrorFromGattErrorCode(error_code);
+ [characteristic_mock simulateGattNotifySessionStoppedWithError:error];
+}
+
void BluetoothTestMac::SimulateGattCharacteristicChanged(
BluetoothRemoteGattCharacteristic* characteristic,
const std::vector<uint8_t>& value) {
@@ -471,7 +487,9 @@ void BluetoothTest::OnFakeBluetoothCharacteristicWriteValue(
gatt_write_characteristic_attempts_++;
}
-void BluetoothTest::OnFakeBluetoothGattSetCharacteristicNotification() {
+void BluetoothTest::OnFakeBluetoothGattSetCharacteristicNotification(
+ bool notify_value) {
+ last_notify_value = notify_value;
gatt_notify_characteristic_attempts_++;
}
« no previous file with comments | « device/bluetooth/test/bluetooth_test_mac.h ('k') | device/bluetooth/test/mock_bluetooth_cbcharacteristic_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698