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

Unified Diff: device/bluetooth/bluetooth_device_unittest.cc

Issue 2567903004: Replace ScopedVector/ScopedPtrHashMap with std::vector and std::unordered_map (Closed)
Patch Set: Mac bustage Created 4 years 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 8d10181907374bef46b4945fe43f02b0889849fe..e73caebfb105dc3b6ab0173ad305039a5fb7a35d 100644
--- a/device/bluetooth/bluetooth_device_unittest.cc
+++ b/device/bluetooth/bluetooth_device_unittest.cc
@@ -951,7 +951,7 @@ TEST_F(BluetoothTest, BluetoothGattConnection_DisconnectInProgress) {
// Disconnect all CreateGattConnection objects & create a new connection.
// But, don't yet simulate the device disconnecting:
ResetEventCounts();
- for (BluetoothGattConnection* connection : gatt_connections_)
+ for (auto& connection : gatt_connections_)
connection->Disconnect();
EXPECT_EQ(1, gatt_disconnection_attempts_);
@@ -966,7 +966,7 @@ TEST_F(BluetoothTest, BluetoothGattConnection_DisconnectInProgress) {
// Actually disconnect:
SimulateGattDisconnection(device);
- for (BluetoothGattConnection* connection : gatt_connections_)
+ for (auto& connection : gatt_connections_)
EXPECT_FALSE(connection->IsConnected());
}
#endif // defined(OS_ANDROID) || defined(OS_MACOSX)
@@ -989,7 +989,7 @@ TEST_F(BluetoothTest, BluetoothGattConnection_SimulateDisconnect) {
EXPECT_EQ(1, gatt_connection_attempts_);
SimulateGattDisconnection(device);
EXPECT_EQ(BluetoothDevice::ERROR_FAILED, last_connect_error_code_);
- for (BluetoothGattConnection* connection : gatt_connections_)
+ for (auto& connection : gatt_connections_)
EXPECT_FALSE(connection->IsConnected());
}
#endif // defined(OS_ANDROID) || defined(OS_MACOSX)
@@ -1042,7 +1042,7 @@ TEST_F(BluetoothTest,
EXPECT_EQ(1, gatt_disconnection_attempts_);
SimulateGattDisconnection(device);
EXPECT_EQ(BluetoothDevice::ERROR_FAILED, last_connect_error_code_);
- for (BluetoothGattConnection* connection : gatt_connections_)
+ for (auto& connection : gatt_connections_)
EXPECT_FALSE(connection->IsConnected());
}
#endif // defined(OS_ANDROID) || defined(OS_MACOSX)
@@ -1127,7 +1127,7 @@ TEST_F(BluetoothTest, BluetoothGattConnection_ErrorAfterConnection) {
#else
EXPECT_EQ(BluetoothDevice::ERROR_AUTH_FAILED, last_connect_error_code_);
#endif
- for (BluetoothGattConnection* connection : gatt_connections_)
+ for (auto& connection : gatt_connections_)
EXPECT_FALSE(connection->IsConnected());
}
#endif // defined(OS_ANDROID) || defined(OS_MACOSX)

Powered by Google App Engine
This is Rietveld 408576698