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

Unified Diff: device/bluetooth/bluetooth_adapter_unittest.cc

Issue 2854733002: bluetooth: macOS: BluetoothLowEnergyDeviceMac::IsConnectable() not implemented (Closed)
Patch Set: Adding unittests and implementation Created 3 years, 8 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/bluetooth_adapter_unittest.cc
diff --git a/device/bluetooth/bluetooth_adapter_unittest.cc b/device/bluetooth/bluetooth_adapter_unittest.cc
index 5a412aa14cc18ecab256922740e7b4aec628dbfd..c51e8459e4047ea58b50d4f65e770b9ca462c37e 100644
--- a/device/bluetooth/bluetooth_adapter_unittest.cc
+++ b/device/bluetooth/bluetooth_adapter_unittest.cc
@@ -1052,4 +1052,22 @@ TEST_F(BluetoothTest, DiscoverConnectedLowEnergyDeviceTwice) {
}
#endif // defined(OS_MACOSX)
+#if defined(OS_MACOSX)
+TEST_F(BluetoothTest, NotConnectableLowEnergyDevice) {
+ if (!PlatformSupportsLowEnergy()) {
+ LOG(WARNING) << "Low Energy Bluetooth unavailable, skipping unit test.";
+ return;
+ }
+ InitWithFakeAdapter();
+ TestBluetoothAdapterObserver observer(adapter_);
+
+ // Start discovery and find a device.
+ StartLowEnergyDiscoverySession();
+ SimulateLowEnergyDevice(6);
+ BluetoothDevice* device = adapter_->GetDevice(observer.last_device_address());
+ EXPECT_TRUE(device);
+ EXPECT_FALSE(device->IsConnectable());
+}
+#endif // defined(OS_MACOSX)
+
} // namespace device

Powered by Google App Engine
This is Rietveld 408576698