| 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) {
|
|
|