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

Unified Diff: device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc

Issue 2032093002: bluetooth: Fix logic mistake in DeviceChanged (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 7 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
« no previous file with comments | « device/bluetooth/bluez/bluetooth_device_bluez.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc
diff --git a/device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc b/device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc
index 1c1c110f5ec61d657a4553bba7836e0740592f58..c5fa376674e42d7fd0d27ab85f7f658b8748117c 100644
--- a/device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc
+++ b/device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc
@@ -205,6 +205,7 @@ TEST_F(BluetoothGattBlueZTest, GattConnection) {
adapter_->GetDevice(bluez::FakeBluetoothDeviceClient::kLowEnergyAddress);
ASSERT_TRUE(device);
ASSERT_FALSE(device->IsConnected());
+ ASSERT_FALSE(device->IsGattConnected());
ASSERT_FALSE(gatt_conn_.get());
ASSERT_EQ(0, success_callback_count_);
ASSERT_EQ(0, error_callback_count_);
@@ -218,6 +219,7 @@ TEST_F(BluetoothGattBlueZTest, GattConnection) {
EXPECT_EQ(1, success_callback_count_);
EXPECT_EQ(0, error_callback_count_);
EXPECT_TRUE(device->IsConnected());
+ EXPECT_TRUE(device->IsGattConnected());
ASSERT_TRUE(gatt_conn_.get());
EXPECT_TRUE(gatt_conn_->IsConnected());
EXPECT_EQ(bluez::FakeBluetoothDeviceClient::kLowEnergyAddress,
@@ -225,6 +227,7 @@ TEST_F(BluetoothGattBlueZTest, GattConnection) {
gatt_conn_->Disconnect();
EXPECT_FALSE(device->IsConnected());
+ EXPECT_FALSE(device->IsGattConnected());
EXPECT_FALSE(gatt_conn_->IsConnected());
device->CreateGattConnection(
@@ -236,6 +239,7 @@ TEST_F(BluetoothGattBlueZTest, GattConnection) {
EXPECT_EQ(2, success_callback_count_);
EXPECT_EQ(0, error_callback_count_);
EXPECT_TRUE(device->IsConnected());
+ EXPECT_TRUE(device->IsGattConnected());
ASSERT_TRUE(gatt_conn_.get());
EXPECT_TRUE(gatt_conn_->IsConnected());
@@ -247,6 +251,7 @@ TEST_F(BluetoothGattBlueZTest, GattConnection) {
EXPECT_EQ(3, success_callback_count_);
EXPECT_EQ(0, error_callback_count_);
EXPECT_FALSE(device->IsConnected());
+ EXPECT_FALSE(device->IsGattConnected());
ASSERT_TRUE(gatt_conn_.get());
EXPECT_FALSE(gatt_conn_->IsConnected());
@@ -259,6 +264,7 @@ TEST_F(BluetoothGattBlueZTest, GattConnection) {
EXPECT_EQ(4, success_callback_count_);
EXPECT_EQ(0, error_callback_count_);
EXPECT_TRUE(device->IsConnected());
+ EXPECT_TRUE(device->IsGattConnected());
EXPECT_TRUE(gatt_conn_->IsConnected());
fake_bluetooth_device_client_->RemoveDevice(
« no previous file with comments | « device/bluetooth/bluez/bluetooth_device_bluez.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698