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

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

Issue 1712593002: bluetooth: android: Confirm the notify session after the descriptor has been written. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Vincent's comments Created 4 years, 10 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_android.h
diff --git a/device/bluetooth/test/bluetooth_test_android.h b/device/bluetooth/test/bluetooth_test_android.h
index 3fb3a3348ba9509425baf8c51948e98234596928..ff6280792e341c4c5fe399dd0467ba72b81a863f 100644
--- a/device/bluetooth/test/bluetooth_test_android.h
+++ b/device/bluetooth/test/bluetooth_test_android.h
@@ -51,6 +51,7 @@ class BluetoothTestAndroid : public BluetoothTestBase {
void SimulateGattCharacteristicChanged(
BluetoothGattCharacteristic* characteristic,
const std::vector<uint8_t>& value) override;
+
void SimulateGattCharacteristicRead(
BluetoothGattCharacteristic* characteristic,
const std::vector<uint8_t>& value) override;
@@ -59,6 +60,7 @@ class BluetoothTestAndroid : public BluetoothTestBase {
BluetoothGattService::GattErrorCode) override;
void SimulateGattCharacteristicReadWillFailSynchronouslyOnce(
BluetoothGattCharacteristic* characteristic) override;
+
void SimulateGattCharacteristicWrite(
BluetoothGattCharacteristic* characteristic) override;
void SimulateGattCharacteristicWriteError(
@@ -66,8 +68,25 @@ class BluetoothTestAndroid : public BluetoothTestBase {
BluetoothGattService::GattErrorCode) override;
void SimulateGattCharacteristicWriteWillFailSynchronouslyOnce(
BluetoothGattCharacteristic* characteristic) override;
+
void SimulateGattDescriptor(BluetoothGattCharacteristic* characteristic,
const std::string& uuid) override;
+ void RememberDescriptorForSubsequentAction(
+ BluetoothGattDescriptor* descriptor) override;
+
+ void SimulateGattDescriptorRead(BluetoothGattDescriptor* descriptor,
+ const std::vector<uint8_t>& value) override;
+ void SimulateGattDescriptorReadError(
+ BluetoothGattDescriptor* descriptor,
+ BluetoothGattService::GattErrorCode) override;
+ void SimulateGattDescriptorReadWillFailSynchronouslyOnce(
+ BluetoothGattDescriptor* descriptor) override;
+
+ void SimulateGattDescriptorWrite(
+ BluetoothGattDescriptor* descriptor) override;
+ void SimulateGattDescriptorWriteError(
+ BluetoothGattDescriptor* descriptor,
+ BluetoothGattService::GattErrorCode) override;
void SimulateGattDescriptorWriteWillFailSynchronouslyOnce(
BluetoothGattDescriptor* descriptor) override;
@@ -112,6 +131,11 @@ class BluetoothTestAndroid : public BluetoothTestBase {
const base::android::JavaParamRef<jobject>& caller,
const base::android::JavaParamRef<jbyteArray>& value);
+ // Records that Java FakeBluetoothGatt readDescriptor was called.
+ void OnFakeBluetoothGattReadDescriptor(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& caller);
+
// Records that Java FakeBluetoothGatt writeDescriptor was called.
void OnFakeBluetoothGattWriteDescriptor(
JNIEnv* env,

Powered by Google App Engine
This is Rietveld 408576698