Chromium Code Reviews| Index: device/bluetooth/bluetooth_gatt_characteristic_unittest.cc |
| diff --git a/device/bluetooth/bluetooth_gatt_characteristic_unittest.cc b/device/bluetooth/bluetooth_gatt_characteristic_unittest.cc |
| index 132a91844411a7db4f010f0f1ff3d39c2ca94e9a..ff5b695d803dee752fef36ca46b5173e44cff2d9 100644 |
| --- a/device/bluetooth/bluetooth_gatt_characteristic_unittest.cc |
| +++ b/device/bluetooth/bluetooth_gatt_characteristic_unittest.cc |
| @@ -82,4 +82,27 @@ TEST_F(BluetoothGattCharacteristicTest, GetIdentifier) { |
| } |
| #endif // defined(OS_ANDROID) |
| +#if defined(OS_ANDROID) |
| +TEST_F(BluetoothGattCharacteristicTest, GetUUID) { |
| + InitWithFakeAdapter(); |
| + StartLowEnergyDiscoverySession(); |
| + BluetoothDevice* device = DiscoverLowEnergyDevice(3); |
| + device->CreateGattConnection(GetGattConnectionCallback(), |
| + GetConnectErrorCallback()); |
| + SimulateGattConnection(device); |
| + std::vector<std::string> services; |
| + services.push_back("00000000-0000-1000-8000-00805f9b34fb"); |
| + SimulateGattServicesDiscovered(device, services); |
| + BluetoothGattService* service = device->GetGattServices()[0]; |
| + |
| + BluetoothUUID characteristic_uuid("22222222-0000-1000-8000-00805f9b34fb"); |
| + SimulateGattCharacteristic(service, characteristic_uuid.canonical_value()); |
| + SimulateGattCharacteristic(service, characteristic_uuid.canonical_value()); |
| + |
| + // Each has the same UUID. |
| + EXPECT_EQ(characteristic_uuid, service->GetCharacteristics()[0]->GetUUID()); |
| + EXPECT_EQ(characteristic_uuid, service->GetCharacteristics()[1]->GetUUID()); |
|
ortuno
2015/10/26 22:10:09
Should we test that GetCharacteristic(instance_id)
scheib
2015/10/27 22:38:18
Done.
|
| +} |
| +#endif // defined(OS_ANDROID) |
| + |
| } // namespace device |