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

Unified Diff: device/bluetooth/bluetooth_remote_gatt_descriptor_unittest.cc

Issue 2595373003: Bluetooth: mac: Working on macOS descriptor implementation. (Closed)
Patch Set: Fixes Created 3 years, 11 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
Index: device/bluetooth/bluetooth_remote_gatt_descriptor_unittest.cc
diff --git a/device/bluetooth/bluetooth_remote_gatt_descriptor_unittest.cc b/device/bluetooth/bluetooth_remote_gatt_descriptor_unittest.cc
index bb89363f0919ca5ab128aa85d779eb8f977eba83..10198f9d9c5de09da53e3af854ec08f8424e9fe6 100644
--- a/device/bluetooth/bluetooth_remote_gatt_descriptor_unittest.cc
+++ b/device/bluetooth/bluetooth_remote_gatt_descriptor_unittest.cc
@@ -52,10 +52,14 @@ class BluetoothRemoteGattDescriptorTest : public BluetoothTest {
BluetoothRemoteGattDescriptor* descriptor1_ = nullptr;
BluetoothRemoteGattDescriptor* descriptor2_ = nullptr;
};
-#endif
+#endif // defined(OS_ANDROID) || defined(OS_MACOSX)
-#if defined(OS_ANDROID)
+#if defined(OS_ANDROID) || defined(OS_MACOSX)
TEST_F(BluetoothRemoteGattDescriptorTest, GetIdentifier) {
+ if (!PlatformSupportsLowEnergy()) {
+ LOG(WARNING) << "Low Energy Bluetooth unavailable, skipping unit test.";
+ return;
+ }
InitWithFakeAdapter();
StartLowEnergyDiscoverySession();
// 2 devices to verify that descriptors on them have distinct IDs.
@@ -130,10 +134,14 @@ TEST_F(BluetoothRemoteGattDescriptorTest, GetIdentifier) {
EXPECT_NE(desc5->GetIdentifier(), desc6->GetIdentifier());
}
-#endif // defined(OS_ANDROID)
+#endif // defined(OS_ANDROID) || defined(OS_MACOSX)
-#if defined(OS_ANDROID)
+#if defined(OS_ANDROID) || defined(OS_MACOSX)
TEST_F(BluetoothRemoteGattDescriptorTest, GetUUID) {
+ if (!PlatformSupportsLowEnergy()) {
+ LOG(WARNING) << "Low Energy Bluetooth unavailable, skipping unit test.";
+ return;
+ }
InitWithFakeAdapter();
StartLowEnergyDiscoverySession();
BluetoothDevice* device = SimulateLowEnergyDevice(3);
@@ -172,7 +180,7 @@ TEST_F(BluetoothRemoteGattDescriptorTest, GetUUID) {
EXPECT_EQ(uuid1, descriptor1->GetUUID());
EXPECT_EQ(uuid2, descriptor2->GetUUID());
}
-#endif // defined(OS_ANDROID)
+#endif // defined(OS_ANDROID) || defined(OS_MACOSX)
#if defined(OS_ANDROID)
// Tests ReadRemoteDescriptor and GetValue with empty value buffer.
« no previous file with comments | « device/bluetooth/bluetooth_remote_gatt_descriptor_mac.mm ('k') | device/bluetooth/bluetooth_remote_gatt_service_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698