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

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 #if to avoid the test for windows (and with the todo and the bug number) 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..97ac1d8fc9780bb2cb7aa6303c44220fc49a0d5b 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_unittest.cc
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_unittest.cc
@@ -559,6 +559,8 @@ 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_->WriteRemoteCharacteristic(
@@ -568,6 +570,10 @@ TEST_F(BluetoothRemoteGattCharacteristicTest, WriteRemoteCharacteristic) {
SimulateGattCharacteristicWrite(characteristic1_);
EXPECT_EQ(1, gatt_write_characteristic_attempts_);
+#if !defined(OS_WIN)
+ // TODO(crbug.com/653291): remove this #if once the bug on windows is fixed.
+ EXPECT_EQ(0, observer.gatt_characteristic_value_changed_count());
+#endif
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