| 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 4e8c00c6c41e4758aa1fb98dfcc8d4d91b56a9aa..0a7c009a8c494788ab867b80a9c2c13a45af377c 100644
|
| --- a/device/bluetooth/bluetooth_remote_gatt_service_unittest.cc
|
| +++ b/device/bluetooth/bluetooth_remote_gatt_service_unittest.cc
|
| @@ -23,7 +23,7 @@ namespace device {
|
| class BluetoothRemoteGattServiceTest : public BluetoothTest {};
|
| #endif
|
|
|
| -#if defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_MACOSX)
|
| +#if defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
|
| TEST_F(BluetoothRemoteGattServiceTest, GetIdentifier) {
|
| if (!PlatformSupportsLowEnergy()) {
|
| LOG(WARNING) << "Low Energy Bluetooth unavailable, skipping unit test.";
|
| @@ -63,9 +63,9 @@ TEST_F(BluetoothRemoteGattServiceTest, GetIdentifier) {
|
|
|
| EXPECT_NE(service3->GetIdentifier(), service4->GetIdentifier());
|
| }
|
| -#endif // defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_MACOSX)
|
| +#endif // defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
|
|
|
| -#if defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_MACOSX)
|
| +#if defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
|
| TEST_F(BluetoothRemoteGattServiceTest, GetUUID) {
|
| if (!PlatformSupportsLowEnergy()) {
|
| LOG(WARNING) << "Low Energy Bluetooth unavailable, skipping unit test.";
|
| @@ -89,9 +89,9 @@ TEST_F(BluetoothRemoteGattServiceTest, GetUUID) {
|
| EXPECT_EQ(uuid, device->GetGattServices()[0]->GetUUID());
|
| EXPECT_EQ(uuid, device->GetGattServices()[1]->GetUUID());
|
| }
|
| -#endif // defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_MACOSX)
|
| +#endif // defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
|
|
|
| -#if defined(OS_ANDROID) || defined(OS_WIN)
|
| +#if defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
|
| TEST_F(BluetoothRemoteGattServiceTest, GetCharacteristics_FindNone) {
|
| if (!PlatformSupportsLowEnergy()) {
|
| LOG(WARNING) << "Low Energy Bluetooth unavailable, skipping unit test.";
|
| @@ -112,9 +112,9 @@ TEST_F(BluetoothRemoteGattServiceTest, GetCharacteristics_FindNone) {
|
|
|
| EXPECT_EQ(0u, service->GetCharacteristics().size());
|
| }
|
| -#endif // defined(OS_ANDROID) || defined(OS_WIN)
|
| +#endif // defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
|
|
|
| -#if defined(OS_ANDROID) || defined(OS_WIN)
|
| +#if defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
|
| TEST_F(BluetoothRemoteGattServiceTest,
|
| GetCharacteristics_and_GetCharacteristic) {
|
| InitWithFakeAdapter();
|
| @@ -161,9 +161,9 @@ TEST_F(BluetoothRemoteGattServiceTest,
|
| EXPECT_EQ(service->GetCharacteristic(char_id1),
|
| service->GetCharacteristic(char_id1));
|
| }
|
| -#endif // defined(OS_ANDROID) || defined(OS_WIN)
|
| +#endif // defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
|
|
|
| -#if defined(OS_WIN)
|
| +#if defined(OS_MACOSX) || defined(OS_WIN)
|
| TEST_F(BluetoothRemoteGattServiceTest,
|
| GetCharacteristic_CharacteristicRemoved) {
|
| InitWithFakeAdapter();
|
| @@ -216,9 +216,16 @@ TEST_F(BluetoothRemoteGattServiceTest,
|
| 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_WIN)
|
| +#endif // defined(OS_MACOSX) || defined(OS_WIN)
|
|
|
| #if defined(OS_WIN) || defined(OS_MACOSX)
|
| TEST_F(BluetoothRemoteGattServiceTest, SimulateGattServiceRemove) {
|
|
|