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

Unified Diff: device/bluetooth/bluetooth_device_unittest.cc

Issue 2727683003: bluetooth: Clean up connection errors (Closed)
Patch Set: format Created 3 years, 10 months 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_device_unittest.cc
diff --git a/device/bluetooth/bluetooth_device_unittest.cc b/device/bluetooth/bluetooth_device_unittest.cc
index 19826117c94d04328119fa93535cd1fdb4cc2c1b..a46fe2b73af6b3745e1380ad02a3a8440a2f31ca 100644
--- a/device/bluetooth/bluetooth_device_unittest.cc
+++ b/device/bluetooth/bluetooth_device_unittest.cc
@@ -1114,17 +1114,9 @@ TEST_F(BluetoothTest, BluetoothGattConnection_ErrorAfterConnection) {
device->CreateGattConnection(GetGattConnectionCallback(Call::NOT_EXPECTED),
GetConnectErrorCallback(Call::EXPECTED));
EXPECT_EQ(1, gatt_connection_attempts_);
- SimulateGattConnectionError(device, BluetoothDevice::ERROR_AUTH_FAILED);
SimulateGattConnectionError(device, BluetoothDevice::ERROR_FAILED);
-#if defined(OS_ANDROID)
- // TODO: Change to ERROR_AUTH_FAILED. We should be getting a callback
- // only with the first error, but our android framework doesn't yet
- // support sending different errors.
- // http://crbug.com/578191
+ SimulateGattConnectionError(device, BluetoothDevice::ERROR_UNKNOWN);
EXPECT_EQ(BluetoothDevice::ERROR_FAILED, last_connect_error_code_);
-#else
- EXPECT_EQ(BluetoothDevice::ERROR_AUTH_FAILED, last_connect_error_code_);
-#endif
for (const auto& connection : gatt_connections_)
EXPECT_FALSE(connection->IsConnected());
}

Powered by Google App Engine
This is Rietveld 408576698