Index: device/bluetooth/bluetooth_gatt_chromeos_unittest.cc |
diff --git a/device/bluetooth/bluetooth_gatt_chromeos_unittest.cc b/device/bluetooth/bluetooth_gatt_chromeos_unittest.cc |
index 3c34663eee111a3f6f1da6f79d82c0f623f150b3..ae3ceeb2c1f485b260a1d3677e5302b49abc4877 100644 |
--- a/device/bluetooth/bluetooth_gatt_chromeos_unittest.cc |
+++ b/device/bluetooth/bluetooth_gatt_chromeos_unittest.cc |
@@ -208,7 +208,7 @@ TEST_F(BluetoothGattChromeOSTest, GattConnection) { |
base::Bind(&BluetoothGattChromeOSTest::ConnectErrorCallback, |
base::Unretained(this))); |
- EXPECT_EQ(1, success_callback_count_); |
+ EXPECT_EQ(1, success_callback_count_--); |
Jeffrey Yasskin
2015/08/19 20:43:46
I think it'd be easier to read to assign success_c
scheib
2015/09/13 02:39:56
I think the extra lines and code dilute the test i
|
EXPECT_EQ(0, error_callback_count_); |
EXPECT_TRUE(device->IsConnected()); |
ASSERT_TRUE(gatt_conn_.get()); |
@@ -216,11 +216,7 @@ TEST_F(BluetoothGattChromeOSTest, GattConnection) { |
EXPECT_EQ(FakeBluetoothDeviceClient::kLowEnergyAddress, |
gatt_conn_->GetDeviceAddress()); |
- gatt_conn_->Disconnect( |
- base::Bind(&BluetoothGattChromeOSTest::SuccessCallback, |
- base::Unretained(this))); |
- EXPECT_EQ(2, success_callback_count_); |
- EXPECT_EQ(0, error_callback_count_); |
+ gatt_conn_->Disconnect(); |
EXPECT_TRUE(device->IsConnected()); |
EXPECT_FALSE(gatt_conn_->IsConnected()); |
@@ -230,7 +226,7 @@ TEST_F(BluetoothGattChromeOSTest, GattConnection) { |
base::Bind(&BluetoothGattChromeOSTest::ConnectErrorCallback, |
base::Unretained(this))); |
- EXPECT_EQ(3, success_callback_count_); |
+ EXPECT_EQ(1, success_callback_count_--); |
EXPECT_EQ(0, error_callback_count_); |
EXPECT_TRUE(device->IsConnected()); |
ASSERT_TRUE(gatt_conn_.get()); |
@@ -242,7 +238,7 @@ TEST_F(BluetoothGattChromeOSTest, GattConnection) { |
base::Bind(&BluetoothGattChromeOSTest::ErrorCallback, |
base::Unretained(this))); |
- EXPECT_EQ(4, success_callback_count_); |
+ EXPECT_EQ(1, success_callback_count_--); |
EXPECT_EQ(0, error_callback_count_); |
ASSERT_TRUE(gatt_conn_.get()); |
EXPECT_FALSE(gatt_conn_->IsConnected()); |
@@ -253,7 +249,7 @@ TEST_F(BluetoothGattChromeOSTest, GattConnection) { |
base::Bind(&BluetoothGattChromeOSTest::ConnectErrorCallback, |
base::Unretained(this))); |
- EXPECT_EQ(5, success_callback_count_); |
+ EXPECT_EQ(1, success_callback_count_--); |
EXPECT_EQ(0, error_callback_count_); |
EXPECT_TRUE(device->IsConnected()); |
EXPECT_TRUE(gatt_conn_->IsConnected()); |