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

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

Issue 2098653002: device/bluetooth/bluez: add discoverable timeout adapter property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing nits Created 4 years, 6 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
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..541ab307ffb9d0395913f89f38a02fb06a7df907 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) {
+ constexpr uint32_t kShortDiscoverableTimeout = 30;
+ constexpr uint32_t kLongDiscoverableTimeout = 240;
+ GetAdapter();
+ BluetoothAdapterBlueZ* adapter_bluez =
+ static_cast<BluetoothAdapterBlueZ*>(adapter_.get());
+
+ fake_bluetooth_adapter_client_->SetDiscoverableTimeout(
+ kShortDiscoverableTimeout);
+ EXPECT_EQ(kShortDiscoverableTimeout, adapter_bluez->GetDiscoverableTimeout());
+
+ fake_bluetooth_adapter_client_->SetDiscoverableTimeout(
+ kLongDiscoverableTimeout);
+ EXPECT_EQ(kLongDiscoverableTimeout, adapter_bluez->GetDiscoverableTimeout());
+}
+
// Verifies Shutdown shuts down the adapter as expected.
TEST_F(BluetoothBlueZTest, Shutdown) {
// Set up adapter. Set powered & discoverable, start discovery.
« no previous file with comments | « device/bluetooth/bluez/bluetooth_adapter_bluez.cc ('k') | device/bluetooth/dbus/fake_bluetooth_adapter_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698