Index: extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_apitest.cc |
diff --git a/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_apitest.cc b/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_apitest.cc |
index 18a82134999cf340e42074395be474a2e0fb9541..ef131ebcde9773a9b57ca4cd8e16198c58835956 100644 |
--- a/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_apitest.cc |
+++ b/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_apitest.cc |
@@ -966,26 +966,38 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, ReadDescriptorValue) { |
event_router()->GattDescriptorAdded(mock_adapter_, desc0_.get()); |
EXPECT_CALL(*mock_adapter_, GetDevice(_)) |
- .Times(3) |
+ .Times(9) |
.WillRepeatedly(Return(device0_.get())); |
EXPECT_CALL(*device0_, GetGattService(kTestServiceId0)) |
- .Times(3) |
+ .Times(9) |
.WillRepeatedly(Return(service0_.get())); |
EXPECT_CALL(*service0_, GetCharacteristic(kTestCharacteristicId0)) |
- .Times(3) |
+ .Times(9) |
.WillRepeatedly(Return(chrc0_.get())); |
EXPECT_CALL(*chrc0_, GetDescriptor(kTestDescriptorId0)) |
- .Times(3) |
+ .Times(9) |
.WillRepeatedly(Return(desc0_.get())); |
std::vector<uint8> value; |
EXPECT_CALL(*desc0_, ReadRemoteDescriptor(_, _)) |
- .Times(2) |
+ .Times(8) |
.WillOnce(InvokeCallbackArgument<1>( |
BluetoothGattService::GattErrorCode::GATT_ERROR_FAILED)) |
+ .WillOnce(InvokeCallbackArgument<1>( |
+ BluetoothGattService::GattErrorCode::GATT_ERROR_INVALID_LENGTH)) |
armansito
2014/10/13 18:51:37
nit: I would ditch the "GattErrorCode::" in betwee
Marie Janssen
2014/10/13 21:22:49
Done.
|
+ .WillOnce(InvokeCallbackArgument<1>( |
+ BluetoothGattService::GattErrorCode::GATT_ERROR_NOT_PERMITTED)) |
+ .WillOnce(InvokeCallbackArgument<1>( |
+ BluetoothGattService::GattErrorCode::GATT_ERROR_NOT_AUTHORIZED)) |
+ .WillOnce(InvokeCallbackArgument<1>( |
+ BluetoothGattService::GattErrorCode::GATT_ERROR_NOT_PAIRED)) |
+ .WillOnce(InvokeCallbackArgument<1>( |
+ BluetoothGattService::GattErrorCode::GATT_ERROR_NOT_SUPPORTED)) |
+ .WillOnce(InvokeCallbackArgument<1>( |
+ BluetoothGattService::GattErrorCode::GATT_ERROR_IN_PROGRESS)) |
.WillOnce(InvokeCallbackArgument<0>(value)); |
ExtensionTestMessageListener listener("ready", true); |
@@ -1138,8 +1150,15 @@ IN_PROC_BROWSER_TEST_F(BluetoothLowEnergyApiTest, GattConnection) { |
EXPECT_CALL(*mock_adapter_, GetDevice(kTestLeDeviceAddress1)) |
.WillRepeatedly(Return(device1_.get())); |
EXPECT_CALL(*device0_, CreateGattConnection(_, _)) |
- .Times(3) |
+ .Times(9) |
.WillOnce(InvokeCallbackArgument<1>(BluetoothDevice::ERROR_FAILED)) |
+ .WillOnce(InvokeCallbackArgument<1>(BluetoothDevice::ERROR_INPROGRESS)) |
+ .WillOnce(InvokeCallbackArgument<1>(BluetoothDevice::ERROR_AUTH_FAILED)) |
+ .WillOnce(InvokeCallbackArgument<1>(BluetoothDevice::ERROR_AUTH_REJECTED)) |
+ .WillOnce(InvokeCallbackArgument<1>(BluetoothDevice::ERROR_AUTH_CANCELED)) |
+ .WillOnce(InvokeCallbackArgument<1>(BluetoothDevice::ERROR_AUTH_TIMEOUT)) |
+ .WillOnce( |
+ InvokeCallbackArgument<1>(BluetoothDevice::ERROR_UNSUPPORTED_DEVICE)) |
.WillOnce(InvokeCallbackWithScopedPtrArg<0, BluetoothGattConnection>( |
CreateGattConnection(kTestLeDeviceAddress0, |
true /* expect_disconnect */))) |