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

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

Issue 1804093003: Add BluetoothGattCharacteristicTest::StartNotifySession_Reentrant unit test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 51e6541f40c21555a8cc32177a321277dcd9199a..9e400bb4fb77a90836f1f95b3c8895d21dc7b70a 100644
--- a/device/bluetooth/test/bluetooth_test.h
+++ b/device/bluetooth/test/bluetooth_test.h
@@ -170,6 +170,11 @@ class BluetoothTestBase : public testing::Test {
virtual void SimulateGattCharacteristicSetNotifyWillFailSynchronouslyOnce(
BluetoothRemoteGattCharacteristic* characteristic) {}
+ // Simulates a Characteristic Set Notify operation failing asynchronously once
+ // for an unknown reason.
+ virtual void SimulateGattCharacteristicSetNotifyWillFailAsynchronouslyOnce(
ortuno 2016/04/22 16:23:39 I think you can just reuse: SimulateGattNotifySess
gogerald1 2016/04/27 20:15:32 Done.
+ BluetoothRemoteGattCharacteristic* characteristic) {}
+
// Simulates a Characteristic Changed operation with updated |value|.
virtual void SimulateGattCharacteristicChanged(
BluetoothRemoteGattCharacteristic* characteristic,
@@ -271,6 +276,15 @@ class BluetoothTestBase : public testing::Test {
enum BluetoothDevice::ConnectErrorCode);
void GattErrorCallback(Call expected,
BluetoothRemoteGattService::GattErrorCode);
+ void ReentrantStartNotifySessionSuccessCallback(
+ Call expected,
+ BluetoothRemoteGattCharacteristic* characteristic,
+ std::unique_ptr<BluetoothGattNotifySession> notify_session);
+ void ReentrantStartNotifySessionErrorCallback(
+ Call expected,
+ BluetoothRemoteGattCharacteristic* characteristic,
+ bool error_in_reentrant,
+ BluetoothGattService::GattErrorCode error_code);
// Accessors to get callbacks bound to this fixture:
base::Closure GetCallback(Call expected);
@@ -286,6 +300,15 @@ class BluetoothTestBase : public testing::Test {
BluetoothDevice::ConnectErrorCallback GetConnectErrorCallback(Call expected);
base::Callback<void(BluetoothRemoteGattService::GattErrorCode)>
GetGattErrorCallback(Call expected);
+ BluetoothRemoteGattCharacteristic::NotifySessionCallback
+ GetReentrantStartNotifySessionSuccessCallback(
+ Call expected,
+ BluetoothRemoteGattCharacteristic* characteristic);
+ base::Callback<void(BluetoothGattService::GattErrorCode)>
+ GetReentrantStartNotifySessionErrorCallback(
+ Call expected,
+ BluetoothRemoteGattCharacteristic* characteristic,
+ bool error_in_reentrant);
// Reset all event count members to 0.
void ResetEventCounts();

Powered by Google App Engine
This is Rietveld 408576698