| Index: device/bluetooth/bluetooth_experimental_chromeos_unittest.cc
|
| diff --git a/device/bluetooth/bluetooth_experimental_chromeos_unittest.cc b/device/bluetooth/bluetooth_experimental_chromeos_unittest.cc
|
| index 7bd7c25fd3582280afff2caef24636298934ad15..e733efe224a7d3d5f6e47341ef2d0817a0dad939 100644
|
| --- a/device/bluetooth/bluetooth_experimental_chromeos_unittest.cc
|
| +++ b/device/bluetooth/bluetooth_experimental_chromeos_unittest.cc
|
| @@ -742,9 +742,11 @@ TEST_F(BluetoothExperimentalChromeOSTest, DeviceProperties) {
|
| EXPECT_EQ(BluetoothDevice::DEVICE_COMPUTER, devices[0]->GetDeviceType());
|
| EXPECT_TRUE(devices[0]->IsPaired());
|
| EXPECT_FALSE(devices[0]->IsConnected());
|
| - EXPECT_FALSE(devices[0]->IsConnectable());
|
| EXPECT_FALSE(devices[0]->IsConnecting());
|
|
|
| + // Non HID devices are always connectable.
|
| + EXPECT_TRUE(devices[0]->IsConnectable());
|
| +
|
| BluetoothDevice::ServiceList uuids = devices[0]->GetServices();
|
| ASSERT_EQ(2U, uuids.size());
|
| EXPECT_EQ(uuids[0], "00001800-0000-1000-8000-00805f9b34fb");
|
| @@ -1127,6 +1129,12 @@ TEST_F(BluetoothExperimentalChromeOSTest, PairAppleMouse) {
|
|
|
| EXPECT_TRUE(device->IsPaired());
|
|
|
| + // Verify is a HID device and is connectable.
|
| + BluetoothDevice::ServiceList uuids = device->GetServices();
|
| + ASSERT_EQ(1U, uuids.size());
|
| + ASSERT_EQ(uuids[0], "00001124-0000-1000-8000-00805f9b34fb");
|
| + EXPECT_TRUE(device->IsConnectable());
|
| +
|
| // Pairing dialog should be dismissed
|
| EXPECT_EQ(1, pairing_delegate.call_count_);
|
| EXPECT_EQ(1, pairing_delegate.dismiss_count_);
|
| @@ -1182,6 +1190,12 @@ TEST_F(BluetoothExperimentalChromeOSTest, PairAppleKeyboard) {
|
|
|
| EXPECT_TRUE(device->IsPaired());
|
|
|
| + // Verify is a HID device and is connectable.
|
| + BluetoothDevice::ServiceList uuids = device->GetServices();
|
| + ASSERT_EQ(1U, uuids.size());
|
| + ASSERT_EQ(uuids[0], "00001124-0000-1000-8000-00805f9b34fb");
|
| + EXPECT_TRUE(device->IsConnectable());
|
| +
|
| // Pairing dialog should be dismissed
|
| EXPECT_EQ(2, pairing_delegate.call_count_);
|
| EXPECT_EQ(1, pairing_delegate.dismiss_count_);
|
| @@ -1239,6 +1253,14 @@ TEST_F(BluetoothExperimentalChromeOSTest, PairMotorolaKeyboard) {
|
|
|
| EXPECT_TRUE(device->IsPaired());
|
|
|
| + // Verify is a HID device.
|
| + BluetoothDevice::ServiceList uuids = device->GetServices();
|
| + ASSERT_EQ(1U, uuids.size());
|
| + ASSERT_EQ(uuids[0], "00001124-0000-1000-8000-00805f9b34fb");
|
| +
|
| + // Fake MotorolaKeyboard is not connectable.
|
| + EXPECT_FALSE(device->IsConnectable());
|
| +
|
| // Pairing dialog should be dismissed
|
| EXPECT_EQ(2, pairing_delegate.call_count_);
|
| EXPECT_EQ(1, pairing_delegate.dismiss_count_);
|
| @@ -1294,6 +1316,13 @@ TEST_F(BluetoothExperimentalChromeOSTest, PairSonyHeadphones) {
|
|
|
| EXPECT_TRUE(device->IsPaired());
|
|
|
| + // Verify is not a HID device.
|
| + BluetoothDevice::ServiceList uuids = device->GetServices();
|
| + ASSERT_EQ(0U, uuids.size());
|
| +
|
| + // Non HID devices are always connectable.
|
| + EXPECT_TRUE(device->IsConnectable());
|
| +
|
| // Pairing dialog should be dismissed
|
| EXPECT_EQ(2, pairing_delegate.call_count_);
|
| EXPECT_EQ(1, pairing_delegate.dismiss_count_);
|
| @@ -1350,6 +1379,9 @@ TEST_F(BluetoothExperimentalChromeOSTest, PairPhone) {
|
|
|
| EXPECT_TRUE(device->IsPaired());
|
|
|
| + // Non HID devices are always connectable.
|
| + EXPECT_TRUE(device->IsConnectable());
|
| +
|
| // Pairing dialog should be dismissed
|
| EXPECT_EQ(2, pairing_delegate.call_count_);
|
| EXPECT_EQ(1, pairing_delegate.dismiss_count_);
|
| @@ -1407,6 +1439,9 @@ TEST_F(BluetoothExperimentalChromeOSTest, PairWeirdDevice) {
|
|
|
| EXPECT_TRUE(device->IsPaired());
|
|
|
| + // Non HID devices are always connectable.
|
| + EXPECT_TRUE(device->IsConnectable());
|
| +
|
| // Pairing dialog should be dismissed
|
| EXPECT_EQ(2, pairing_delegate.call_count_);
|
| EXPECT_EQ(1, pairing_delegate.dismiss_count_);
|
|
|