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

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: Fix a silly mistake in commit e4725886 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 cdb85a6cbfe458c02182abb7ff22cf39f4a57844..ecfd31d1c3e30cafdb92f131e48cbf0c572aa07c 100644
--- a/device/bluetooth/test/bluetooth_test.h
+++ b/device/bluetooth/test/bluetooth_test.h
@@ -184,6 +184,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(
@@ -335,6 +350,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,
@@ -359,6 +379,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);

Powered by Google App Engine
This is Rietveld 408576698