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

Unified Diff: device/bluetooth/bluetooth_remote_gatt_characteristic_unittest.cc

Issue 2357993002: Don't send a value changed notification when a characteristic is written (Closed)
Patch Set: Adding unittest Created 4 years, 2 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/bluetooth_remote_gatt_characteristic_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_remote_gatt_characteristic_unittest.cc
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_unittest.cc b/device/bluetooth/bluetooth_remote_gatt_characteristic_unittest.cc
index 0102f138f3e3735eeb2bf8577e1fb9602fc7eb1f..9d7812189a40f885bf54041ec33bbfdf6688d678 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_unittest.cc
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_unittest.cc
@@ -559,8 +559,13 @@ TEST_F(BluetoothRemoteGattCharacteristicTest, WriteRemoteCharacteristic) {
ASSERT_NO_FATAL_FAILURE(FakeCharacteristicBoilerplate(
BluetoothRemoteGattCharacteristic::PROPERTY_WRITE));
+ TestBluetoothAdapterObserver observer(adapter_);
+
uint8_t values[] = {0, 1, 2, 3, 4, 0xf, 0xf0, 0xff};
std::vector<uint8_t> test_vector(values, values + arraysize(values));
+ characteristic1_->ReadRemoteCharacteristic(
ortuno 2016/10/05 21:42:23 I'm not sure why you are adding this?
jlebel 2016/10/05 22:07:38 Done.
+ GetReadValueCallback(Call::NOT_EXPECTED),
+ GetGattErrorCallback(Call::NOT_EXPECTED));
characteristic1_->WriteRemoteCharacteristic(
test_vector, GetCallback(Call::EXPECTED),
GetGattErrorCallback(Call::NOT_EXPECTED));
@@ -568,6 +573,7 @@ TEST_F(BluetoothRemoteGattCharacteristicTest, WriteRemoteCharacteristic) {
SimulateGattCharacteristicWrite(characteristic1_);
EXPECT_EQ(1, gatt_write_characteristic_attempts_);
+ EXPECT_EQ(0, observer.gatt_characteristic_value_changed_count());
EXPECT_EQ(test_vector, last_write_value_);
}
#endif // defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
« no previous file with comments | « device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698