diff options
Diffstat (limited to 'device/bluetooth/test/bluetooth_test.h')
-rw-r--r-- | device/bluetooth/test/bluetooth_test.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/device/bluetooth/test/bluetooth_test.h b/device/bluetooth/test/bluetooth_test.h index a0066e9..3ddfec9 100644 --- a/device/bluetooth/test/bluetooth_test.h +++ b/device/bluetooth/test/bluetooth_test.h @@ -118,6 +118,14 @@ class BluetoothTestBase : public testing::Test { const std::string& uuid, int properties) {} + // Remembers |characteristic|'s platform specific object to be used in a + // subsequent call to methods such as SimulateGattCharacteristicRead that + // accept a nullptr value to select this remembered characteristic. This + // enables tests where the platform attempts to reference characteristic + // objects after the Chrome objects have been deleted, e.g. with DeleteDevice. + virtual void RememberCharacteristicForSubsequentAction( + BluetoothGattCharacteristic* characteristic) {} + // Simulates a Characteristic Set Notify success. virtual void SimulateGattNotifySessionStarted( BluetoothGattCharacteristic* characteristic) {} @@ -128,6 +136,8 @@ class BluetoothTestBase : public testing::Test { BluetoothGattCharacteristic* characteristic) {} // Simulates a Characteristic Read operation succeeding, returning |value|. + // If |characteristic| is null, acts upon the characteristic provided to + // RememberCharacteristicForSubsequentAction. virtual void SimulateGattCharacteristicRead( BluetoothGattCharacteristic* characteristic, const std::vector<uint8>& value) {} @@ -143,6 +153,8 @@ class BluetoothTestBase : public testing::Test { BluetoothGattCharacteristic* characteristic) {} // Simulates a Characteristic Write operation succeeding, returning |value|. + // If |characteristic| is null, acts upon the characteristic provided to + // RememberCharacteristicForSubsequentAction. virtual void SimulateGattCharacteristicWrite( BluetoothGattCharacteristic* characteristic) {} @@ -156,7 +168,7 @@ class BluetoothTestBase : public testing::Test { virtual void SimulateGattCharacteristicWriteWillFailSynchronouslyOnce( BluetoothGattCharacteristic* characteristic) {} - // Remove the device from the adapter and delete it. + // Removes the device from the adapter and deletes it. virtual void DeleteDevice(BluetoothDevice* device); // Callbacks that increment |callback_count_|, |error_callback_count_|: |