Chromium Code Reviews| Index: device/bluetooth/bluetooth_device_unittest.cc |
| diff --git a/device/bluetooth/bluetooth_device_unittest.cc b/device/bluetooth/bluetooth_device_unittest.cc |
| index ab478fc7386df4a49d9bf91a0645488354e48239..036984a44c9424e4d921b81798984772b2307683 100644 |
| --- a/device/bluetooth/bluetooth_device_unittest.cc |
| +++ b/device/bluetooth/bluetooth_device_unittest.cc |
| @@ -434,11 +434,11 @@ TEST_F(BluetoothTest, GetUUIDs_Connection) { |
| #if defined(OS_MACOSX) |
| // Tests that receiving 2 notifications in a row from macOS that services has |
| -// changed is handled correctly. Each notification should generate a notfication |
| -// that the gatt device has changed, and each notification should ask to macOS |
| -// to scan for services. Only after the second service scan is received, the |
| -// device changed notification should be sent and the characteristic discovery |
| -// procedure should be started. |
| +// changed is handled correctly. Each notification should generate a |
| +// notification that the gatt device has changed, and each notification should |
| +// ask to macOS to scan for services. Only after the second service scan is |
| +// received, the device changed notification should be sent and the |
| +// characteristic discovery procedure should be started. |
| // Android: This test doesn't apply to Android because there is no services |
| // changed event that could arrive during a discovery procedure. |
| TEST_F(BluetoothTest, TwoPendingServiceDiscoveryRequests) { |
| @@ -465,7 +465,8 @@ TEST_F(BluetoothTest, TwoPendingServiceDiscoveryRequests) { |
| // Fist system call to |
| // -[id<CBPeripheralDelegate> peripheral:didDiscoverServices:] |
| observer.Reset(); |
| - SimulateDidDiscoverServices(device, {kTestUUIDHeartRate}); |
| + AddServicesToDevice(device, {kTestUUIDHeartRate}); |
| + SimulateDidDiscoverServices(device); |
| EXPECT_EQ(0, observer.device_changed_count()); |
| EXPECT_FALSE(device->IsGattServicesDiscoveryComplete()); |
| EXPECT_EQ(gatt_characteristic_discovery_attempts_, 0); |
| @@ -513,7 +514,8 @@ TEST_F(BluetoothTest, ExtraDidDiscoverServicesCall) { |
| // Unexpected system call to |
|
scheib
2017/04/18 04:43:21
explain here why another didDiscoverServices is un
jlebel
2017/04/29 22:08:07
Done.
|
| // -[id<CBPeripheralDelegate> peripheral:didDiscoverServices:] |
| - SimulateDidDiscoverServices(device, {kTestUUIDImmediateAlert}); |
| + AddServicesToDevice(device, {kTestUUIDImmediateAlert}); |
| + SimulateDidDiscoverServices(device); |
| EXPECT_EQ(1, observer.device_changed_count()); |
| EXPECT_TRUE(device->IsGattServicesDiscoveryComplete()); |