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

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

Issue 1779083002: bluetooth: Test & make StartNotifySession reentrant. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bta-notify-followup-descriptors-
Patch Set: addressed ortuno comments Created 4 years, 9 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 c840935138d6df9751380d3e75eb71ebccdfe27c..279b2e962bdc26e04d95ab903abc4692b195c125 100644
--- a/device/bluetooth/test/bluetooth_test.h
+++ b/device/bluetooth/test/bluetooth_test.h
@@ -137,10 +137,29 @@ class BluetoothTestBase : public testing::Test {
virtual void RememberCharacteristicForSubsequentAction(
BluetoothGattCharacteristic* characteristic) {}
+ // Remembers |characteristic|'s Client Characteristic Configuration (CCC)
+ // descriptor's platform specific object to be used in a subsequent call to
+ // methods such as SimulateGattNotifySessionStarted. This enables tests where
+ // the platform attempts to reference descriptor objects after the Chrome
+ // objects have been deleted, e.g. with DeleteDevice.
+ virtual void RememberCCCDescriptorForSubsequentAction(
+ BluetoothGattCharacteristic* characteristic) {}
+
// Simulates a Characteristic Set Notify success.
+ // If |characteristic| is null, acts upon the characteristic & CCC
+ // descriptor provided to RememberCharacteristicForSubsequentAction &
+ // RememberCCCDescriptorForSubsequentAction.
virtual void SimulateGattNotifySessionStarted(
BluetoothGattCharacteristic* characteristic) {}
+ // Simulates a Characteristic Set Notify error.
+ // If |characteristic| is null, acts upon the characteristic & CCC
+ // descriptor provided to RememberCharacteristicForSubsequentAction &
+ // RememberCCCDescriptorForSubsequentAction.
+ virtual void SimulateGattNotifySessionStartError(
+ BluetoothGattCharacteristic* characteristic,
+ BluetoothGattService::GattErrorCode error_code) {}
+
// Simulates a Characteristic Set Notify operation failing synchronously once
// for an unknown reason.
virtual void SimulateGattCharacteristicSetNotifyWillFailSynchronouslyOnce(
« no previous file with comments | « device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc ('k') | device/bluetooth/test/bluetooth_test_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698