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

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 new review comments Created 4 years, 4 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 cec8fe03f5fc5073e0853750a5863375ea11705d..db27ef4d75cde4bad28f0ebb73909b6b78d2349f 100644
--- a/device/bluetooth/test/bluetooth_test.h
+++ b/device/bluetooth/test/bluetooth_test.h
@@ -187,6 +187,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(
@@ -338,6 +353,11 @@ class BluetoothTestBase : public testing::Test {
std::unique_ptr<BluetoothGattConnection>);
void NotifyCallback(Call expected,
std::unique_ptr<BluetoothGattNotifySession>);
+ void NotifyCheckForPrecedingCalls(
+ int num_of_preceding_calls,
+ std::unique_ptr<BluetoothGattNotifySession>);
+ void StopNotifyCallback(Call expected);
+ void StopNotifyCheckForPrecedingCalls(int num_of_preceding_calls);
void ReadValueCallback(Call expected, const std::vector<uint8_t>& value);
void ErrorCallback(Call expected);
void ConnectErrorCallback(Call expected,
@@ -362,6 +382,10 @@ class BluetoothTestBase : public testing::Test {
Call expected);
BluetoothRemoteGattCharacteristic::NotifySessionCallback GetNotifyCallback(
Call expected);
+ BluetoothRemoteGattCharacteristic::NotifySessionCallback
+ GetNotifyCheckForPrecedingCalls(int num_of_preceding_calls);
+ base::Closure GetStopNotifyCallback(Call expected);
+ base::Closure GetStopNotifyCheckForPrecedingCalls(int num_of_preceding_calls);
BluetoothRemoteGattCharacteristic::ValueCallback GetReadValueCallback(
Call expected);
BluetoothAdapter::ErrorCallback GetErrorCallback(Call expected);
« no previous file with comments | « device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.cc ('k') | device/bluetooth/test/bluetooth_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698