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

Unified Diff: device/bluetooth/bluetooth_remote_gatt_service_unittest.cc

Issue 2071853002: Revert of bluetooth: mac: Initial BluetoothRemoteGattCharacteristicMac implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@servicescan_cleanup
Patch Set: 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 | « device/bluetooth/bluetooth_remote_gatt_service_mac.mm ('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/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..4e8c00c6c41e4758aa1fb98dfcc8d4d91b56a9aa 100644
--- a/device/bluetooth/bluetooth_remote_gatt_service_unittest.cc
+++ b/device/bluetooth/bluetooth_remote_gatt_service_unittest.cc
@@ -23,7 +23,7 @@
class BluetoothRemoteGattServiceTest : public BluetoothTest {};
#endif
-#if defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
+#if defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_MACOSX)
TEST_F(BluetoothRemoteGattServiceTest, GetIdentifier) {
if (!PlatformSupportsLowEnergy()) {
LOG(WARNING) << "Low Energy Bluetooth unavailable, skipping unit test.";
@@ -63,9 +63,9 @@
EXPECT_NE(service3->GetIdentifier(), service4->GetIdentifier());
}
-#endif // defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
-
-#if defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
+#endif // defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_MACOSX)
+
+#if defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_MACOSX)
TEST_F(BluetoothRemoteGattServiceTest, GetUUID) {
if (!PlatformSupportsLowEnergy()) {
LOG(WARNING) << "Low Energy Bluetooth unavailable, skipping unit test.";
@@ -89,9 +89,9 @@
EXPECT_EQ(uuid, device->GetGattServices()[0]->GetUUID());
EXPECT_EQ(uuid, device->GetGattServices()[1]->GetUUID());
}
-#endif // defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
-
-#if defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
+#endif // defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_MACOSX)
+
+#if defined(OS_ANDROID) || defined(OS_WIN)
TEST_F(BluetoothRemoteGattServiceTest, GetCharacteristics_FindNone) {
if (!PlatformSupportsLowEnergy()) {
LOG(WARNING) << "Low Energy Bluetooth unavailable, skipping unit test.";
@@ -112,15 +112,11 @@
EXPECT_EQ(0u, service->GetCharacteristics().size());
}
-#endif // defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
-
-#if defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
+#endif // defined(OS_ANDROID) || defined(OS_WIN)
+
+#if defined(OS_ANDROID) || defined(OS_WIN)
TEST_F(BluetoothRemoteGattServiceTest,
GetCharacteristics_and_GetCharacteristic) {
- if (!PlatformSupportsLowEnergy()) {
- LOG(WARNING) << "Low Energy Bluetooth unavailable, skipping unit test.";
- return;
- }
InitWithFakeAdapter();
StartLowEnergyDiscoverySession();
BluetoothDevice* device = SimulateLowEnergyDevice(3);
@@ -165,15 +161,11 @@
EXPECT_EQ(service->GetCharacteristic(char_id1),
service->GetCharacteristic(char_id1));
}
-#endif // defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
-
-#if defined(OS_MACOSX) || defined(OS_WIN)
+#endif // defined(OS_ANDROID) || defined(OS_WIN)
+
+#if defined(OS_WIN)
TEST_F(BluetoothRemoteGattServiceTest,
GetCharacteristic_CharacteristicRemoved) {
- if (!PlatformSupportsLowEnergy()) {
- LOG(WARNING) << "Low Energy Bluetooth unavailable, skipping unit test.";
- return;
- }
InitWithFakeAdapter();
StartLowEnergyDiscoverySession();
BluetoothDevice* device = SimulateLowEnergyDevice(3);
@@ -224,16 +216,9 @@
EXPECT_FALSE(service->GetCharacteristic(removed_char));
EXPECT_EQ(0u, service->GetCharacteristics().size());
-#if defined(OS_MACOSX)
- // SimulateGattServicesDiscovered
- // 4 * SimulateGattCharacteristic
- // 4 * SimulateGattCharacteristicRemoved
- EXPECT_EQ(9, observer.gatt_service_changed_count());
-#else // defined(OS_MACOSX)
EXPECT_EQ(4, observer.gatt_service_changed_count());
-#endif // defined(OS_MACOSX)
-}
-#endif // defined(OS_MACOSX) || defined(OS_WIN)
+}
+#endif // defined(OS_WIN)
#if defined(OS_WIN) || defined(OS_MACOSX)
TEST_F(BluetoothRemoteGattServiceTest, SimulateGattServiceRemove) {
« no previous file with comments | « device/bluetooth/bluetooth_remote_gatt_service_mac.mm ('k') | device/bluetooth/test/bluetooth_test_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698