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

Unified Diff: device/bluetooth/bluetooth_gatt_service_unittest.cc

Issue 1465863003: bluetooth: Fix crash when trying to read or write when operation pending (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Address scheib's comments Created 5 years, 1 month 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_gatt_service_unittest.cc
diff --git a/device/bluetooth/bluetooth_gatt_service_unittest.cc b/device/bluetooth/bluetooth_gatt_service_unittest.cc
index cd8c0d8dc9c5e25d88be253f3bf6f76b77017edb..7c3af7353eabde6951ba962b1a70a85002901a87 100644
--- a/device/bluetooth/bluetooth_gatt_service_unittest.cc
+++ b/device/bluetooth/bluetooth_gatt_service_unittest.cc
@@ -26,10 +26,10 @@ TEST_F(BluetoothGattServiceTest, GetIdentifier) {
// 2 devices to verify unique IDs across them.
BluetoothDevice* device1 = DiscoverLowEnergyDevice(3);
BluetoothDevice* device2 = DiscoverLowEnergyDevice(4);
- device1->CreateGattConnection(GetGattConnectionCallback(),
- GetConnectErrorCallback());
- device2->CreateGattConnection(GetGattConnectionCallback(),
- GetConnectErrorCallback());
+ device1->CreateGattConnection(GetGattConnectionCallback(Call::EXPECTED),
+ GetConnectErrorCallback(Call::NOT_EXPECTED));
+ device2->CreateGattConnection(GetGattConnectionCallback(Call::EXPECTED),
+ GetConnectErrorCallback(Call::NOT_EXPECTED));
SimulateGattConnection(device1);
SimulateGattConnection(device2);
@@ -62,8 +62,8 @@ TEST_F(BluetoothGattServiceTest, GetUUID) {
InitWithFakeAdapter();
StartLowEnergyDiscoverySession();
BluetoothDevice* device = DiscoverLowEnergyDevice(3);
- device->CreateGattConnection(GetGattConnectionCallback(),
- GetConnectErrorCallback());
+ device->CreateGattConnection(GetGattConnectionCallback(Call::EXPECTED),
+ GetConnectErrorCallback(Call::NOT_EXPECTED));
SimulateGattConnection(device);
// Create multiple instances with the same UUID.
@@ -84,8 +84,8 @@ TEST_F(BluetoothGattServiceTest, GetCharacteristics_FindNone) {
InitWithFakeAdapter();
StartLowEnergyDiscoverySession();
BluetoothDevice* device = DiscoverLowEnergyDevice(3);
- device->CreateGattConnection(GetGattConnectionCallback(),
- GetConnectErrorCallback());
+ device->CreateGattConnection(GetGattConnectionCallback(Call::EXPECTED),
+ GetConnectErrorCallback(Call::NOT_EXPECTED));
SimulateGattConnection(device);
// Simulate a service, with no Characteristics:
@@ -103,8 +103,8 @@ TEST_F(BluetoothGattServiceTest, GetCharacteristics_and_GetCharacteristic) {
InitWithFakeAdapter();
StartLowEnergyDiscoverySession();
BluetoothDevice* device = DiscoverLowEnergyDevice(3);
- device->CreateGattConnection(GetGattConnectionCallback(),
- GetConnectErrorCallback());
+ device->CreateGattConnection(GetGattConnectionCallback(Call::EXPECTED),
+ GetConnectErrorCallback(Call::NOT_EXPECTED));
SimulateGattConnection(device);
// Simulate a service, with several Characteristics:

Powered by Google App Engine
This is Rietveld 408576698