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

Unified Diff: device/bluetooth/bluetooth_remote_gatt_service_unittest.cc

Issue 2068203002: Adding unit test for characteristic notification. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@characteristicscan_servicescan_cleanup
Patch Set: Merge top of tree Created 4 years, 6 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 | « no previous file | 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_service_unittest.cc
diff --git a/device/bluetooth/bluetooth_remote_gatt_service_unittest.cc b/device/bluetooth/bluetooth_remote_gatt_service_unittest.cc
index 0454f608aec8ebc9593504ac85a3cfdf45ea789e..f7018ef3967f738587afefa0efc71fabd04ff7f4 100644
--- a/device/bluetooth/bluetooth_remote_gatt_service_unittest.cc
+++ b/device/bluetooth/bluetooth_remote_gatt_service_unittest.cc
@@ -168,8 +168,7 @@ TEST_F(BluetoothRemoteGattServiceTest,
#endif // defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
#if defined(OS_MACOSX) || defined(OS_WIN)
-TEST_F(BluetoothRemoteGattServiceTest,
- GetCharacteristic_CharacteristicRemoved) {
+TEST_F(BluetoothRemoteGattServiceTest, GattCharacteristics_ObserversCalls) {
if (!PlatformSupportsLowEnergy()) {
LOG(WARNING) << "Low Energy Bluetooth unavailable, skipping unit test.";
return;
@@ -196,6 +195,10 @@ TEST_F(BluetoothRemoteGattServiceTest,
SimulateGattCharacteristic(service, characteristic_uuid2, /* properties */ 0);
SimulateGattCharacteristic(service, characteristic_uuid3, /* properties */ 0);
SimulateGattCharacteristic(service, characteristic_uuid4, /* properties */ 0);
+#if !defined(OS_WIN)
+ // TODO(620895) GattCharacteristicAdded has to be implemented for Windows.
+ EXPECT_EQ(4, observer.gatt_characteristic_added_count());
+#endif // !defined(OS_WIN)
// Simulate remove of characteristics one by one.
EXPECT_EQ(4u, service->GetCharacteristics().size());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698