Index: device/bluetooth/test/bluetooth_test.cc |
diff --git a/device/bluetooth/test/bluetooth_test.cc b/device/bluetooth/test/bluetooth_test.cc |
index 394227812e79aa41a898edfbc3c156933ffee81c..6edea59d1bf2cf292e7ebe9c1cd34b348fdd23f1 100644 |
--- a/device/bluetooth/test/bluetooth_test.cc |
+++ b/device/bluetooth/test/bluetooth_test.cc |
@@ -92,6 +92,17 @@ std::vector<uint8_t> BluetoothTestBase::LastNotifactionValueForCharacteristic( |
return std::vector<uint8_t>(); |
} |
+void BluetoothTestBase::CheckNotifySessionValue( |
ortuno
2017/02/20 07:28:02
Great idea! Two suggestiongs:
1. What do you thin
ortuno
2017/02/20 07:32:50
Small correction: This should be {NOTIFY, INDICATE
jlebel
2017/02/21 21:46:30
Done.
|
+ uint16_t expected_config_descriptor_value, |
+ int attempts) { |
+ EXPECT_EQ(attempts, gatt_write_descriptor_attempts_); |
ortuno
2017/02/20 07:28:02
Could we include gatt_notify_characteristic_attemp
jlebel
2017/02/21 21:46:30
This is mac only. So either I use #define for mac
ortuno
2017/02/22 03:26:21
Actually all platforms use gatt_notify_characteris
jlebel
2017/02/22 12:02:08
Done.
|
+ ASSERT_EQ(2u, last_write_value_.size()); |
+ uint8_t expected_byte0 = expected_config_descriptor_value & 0xFF; |
+ uint8_t expected_byte1 = (expected_config_descriptor_value >> 8) & 0xFF; |
+ EXPECT_EQ(expected_byte0, last_write_value_[0]); |
+ EXPECT_EQ(expected_byte1, last_write_value_[1]); |
+} |
+ |
std::vector<BluetoothLocalGattService*> |
BluetoothTestBase::RegisteredGattServices() { |
NOTIMPLEMENTED(); |