Chromium Code Reviews| Index: device/bluetooth/bluez/bluetooth_bluez_unittest.cc |
| diff --git a/device/bluetooth/bluez/bluetooth_bluez_unittest.cc b/device/bluetooth/bluez/bluetooth_bluez_unittest.cc |
| index 86d3c4451591e21dcc68f64aeab949df532acd4d..72e9ca94c40d02f8bfecffa6aaf15287961e6851 100644 |
| --- a/device/bluetooth/bluez/bluetooth_bluez_unittest.cc |
| +++ b/device/bluetooth/bluez/bluetooth_bluez_unittest.cc |
| @@ -4162,6 +4162,22 @@ TEST_F(BluetoothBlueZTest, GetConnectionInfoForConnectedDevice) { |
| EXPECT_EQ(4, conn_info.max_transmit_power); |
| } |
| +TEST_F(BluetoothBlueZTest, GetDiscoverableTimeout) { |
| + const uint32_t kShortDiscoverableTimeout = 30; |
|
ortuno
2016/06/24 20:35:53
nit: Can you use constexpr here?
|
| + const uint32_t kLongDiscoverableTimeout = 240; |
| + GetAdapter(); |
| + BluetoothAdapterBlueZ* adapter_bluez = |
| + static_cast<BluetoothAdapterBlueZ*>(adapter_.get()); |
| + |
| + fake_bluetooth_adapter_client_->SetDiscoverableTimeout( |
| + kShortDiscoverableTimeout); |
| + EXPECT_EQ(adapter_bluez->GetDiscoverableTimeout(), kShortDiscoverableTimeout); |
|
ortuno
2016/06/24 20:35:53
Swap these two arguments. The first value should b
|
| + |
| + fake_bluetooth_adapter_client_->SetDiscoverableTimeout( |
| + kLongDiscoverableTimeout); |
| + EXPECT_EQ(adapter_bluez->GetDiscoverableTimeout(), kLongDiscoverableTimeout); |
| +} |
| + |
| // Verifies Shutdown shuts down the adapter as expected. |
| TEST_F(BluetoothBlueZTest, Shutdown) { |
| // Set up adapter. Set powered & discoverable, start discovery. |