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

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

Issue 2695573002: Adding BluetoothTestBase::CheckNotifySessionValue() method (Closed)
Patch Set: Cleanup Created 3 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
« no previous file with comments | « device/bluetooth/test/bluetooth_test.h ('k') | device/bluetooth/test/bluetooth_test_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0618d7bfdcac39e0a17d5f832963c5cd48cb4919 100644
--- a/device/bluetooth/test/bluetooth_test.cc
+++ b/device/bluetooth/test/bluetooth_test.cc
@@ -92,6 +92,29 @@ std::vector<uint8_t> BluetoothTestBase::LastNotifactionValueForCharacteristic(
return std::vector<uint8_t>();
}
+void BluetoothTestBase::ExpectedChangeNotifyValueAttempts(int attempts) {
+ EXPECT_EQ(attempts, gatt_write_descriptor_attempts_);
+}
+
+void BluetoothTestBase::ExpectedNotifyValue(
+ NotifyValueState expected_value_state) {
+ ASSERT_EQ(2u, last_write_value_.size());
+ switch (expected_value_state) {
+ case NotifyValueState::NONE:
+ EXPECT_EQ(0, last_write_value_[0]);
+ EXPECT_EQ(0, last_write_value_[1]);
+ break;
+ case NotifyValueState::NOTIFY:
+ EXPECT_EQ(1, last_write_value_[0]);
+ EXPECT_EQ(0, last_write_value_[1]);
+ break;
+ case NotifyValueState::INDICATE:
+ EXPECT_EQ(2, last_write_value_[0]);
+ EXPECT_EQ(0, last_write_value_[1]);
+ break;
+ }
+}
+
std::vector<BluetoothLocalGattService*>
BluetoothTestBase::RegisteredGattServices() {
NOTIMPLEMENTED();
@@ -374,7 +397,6 @@ void BluetoothTestBase::ResetEventCounts() {
gatt_connection_attempts_ = 0;
gatt_disconnection_attempts_ = 0;
gatt_discovery_attempts_ = 0;
- gatt_notify_characteristic_attempts_ = 0;
ortuno 2017/02/22 03:26:21 Both android[1] and windows[2] have "StartNotifica
jlebel 2017/02/22 12:02:08 Sorry about that. I was a bit fast.
gatt_read_characteristic_attempts_ = 0;
gatt_write_characteristic_attempts_ = 0;
gatt_read_descriptor_attempts_ = 0;
« no previous file with comments | « device/bluetooth/test/bluetooth_test.h ('k') | device/bluetooth/test/bluetooth_test_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698