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

Unified Diff: device/bluetooth/test/bluetooth_test.h

Issue 2051333004: Implement BluetoothGattNotifySession::Stop on Android, 2nd attempt (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Giovanni's review comments Created 4 years, 5 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.h
diff --git a/device/bluetooth/test/bluetooth_test.h b/device/bluetooth/test/bluetooth_test.h
index b91359df5a7b383dd3496f7c2041434d081e318e..52e8c9045c29439aa905cb2b1f529e3f2619e47c 100644
--- a/device/bluetooth/test/bluetooth_test.h
+++ b/device/bluetooth/test/bluetooth_test.h
@@ -177,6 +177,21 @@ class BluetoothTestBase : public testing::Test {
BluetoothRemoteGattCharacteristic* characteristic,
BluetoothRemoteGattService::GattErrorCode error_code) {}
+ // Simulates a Characteristic Stop Notify completed.
+ // If |characteristic| is null, acts upon the characteristic & CCC
+ // descriptor provided to RememberCharacteristicForSubsequentAction &
+ // RememberCCCDescriptorForSubsequentAction.
+ virtual void SimulateGattNotifySessionStopped(
+ BluetoothRemoteGattCharacteristic* characteristic) {}
+
+ // Simulates a Characteristic Stop Notify error.
+ // If |characteristic| is null, acts upon the characteristic & CCC
+ // descriptor provided to RememberCharacteristicForSubsequentAction &
+ // RememberCCCDescriptorForSubsequentAction.
+ virtual void SimulateGattNotifySessionStopError(
+ BluetoothRemoteGattCharacteristic* characteristic,
+ BluetoothRemoteGattService::GattErrorCode error_code) {}
+
// Simulates a Characteristic Set Notify operation failing synchronously once
// for an unknown reason.
virtual void SimulateGattCharacteristicSetNotifyWillFailSynchronouslyOnce(
@@ -328,6 +343,8 @@ class BluetoothTestBase : public testing::Test {
std::unique_ptr<BluetoothGattConnection>);
void NotifyCallback(Call expected,
std::unique_ptr<BluetoothGattNotifySession>);
+ void StopNotifyCallback(Call expected,
+ BluetoothGattNotifySession* notify_session);
void ReadValueCallback(Call expected, const std::vector<uint8_t>& value);
void ErrorCallback(Call expected);
void ConnectErrorCallback(Call expected,
@@ -352,6 +369,9 @@ class BluetoothTestBase : public testing::Test {
Call expected);
BluetoothRemoteGattCharacteristic::NotifySessionCallback GetNotifyCallback(
Call expected);
+ base::Closure GetStopNotifyCallback(
+ Call expected,
+ BluetoothGattNotifySession* notify_session);
BluetoothRemoteGattCharacteristic::ValueCallback GetReadValueCallback(
Call expected);
BluetoothAdapter::ErrorCallback GetErrorCallback(Call expected);

Powered by Google App Engine
This is Rietveld 408576698