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

Unified Diff: device/bluetooth/bluetooth_adapter_unittest.cc

Issue 2242833002: Bluetooth: mac: add connected BLE devices at startup Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Device: bluetooth: use untyped containers Created 4 years, 3 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/bluetooth_adapter_mac.mm ('k') | device/bluetooth/bluetooth_low_energy_device_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_adapter_unittest.cc
diff --git a/device/bluetooth/bluetooth_adapter_unittest.cc b/device/bluetooth/bluetooth_adapter_unittest.cc
index 0d91483fbf44a0f275987c8bd92976be755f3917..ee5346bf60a9b231e7b3c5fe9c37c078ad0df2d7 100644
--- a/device/bluetooth/bluetooth_adapter_unittest.cc
+++ b/device/bluetooth/bluetooth_adapter_unittest.cc
@@ -479,6 +479,22 @@ TEST_F(BluetoothTest, ConstructFakeAdapter) {
}
#endif // defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
+// TODO(jracle): Enable this test on other platforms.
+#if defined(OS_MACOSX)
+TEST_F(BluetoothTest, ConstructFakeAdapterWithConnectedLowEnergyDevice) {
+ if (!PlatformSupportsLowEnergy()) {
+ LOG(WARNING) << "Low Energy Bluetooth unavailable, skipping unit test.";
+ return;
+ }
+
+ InitWithFakeAdapterWithConnectedLowEnergyDevice();
+
+ EXPECT_EQ(1u, adapter_->GetDevices().size());
+ EXPECT_EQ(adapter_->GetDevices()[0]->GetName(), kTestDeviceName);
+ EXPECT_FALSE(adapter_->GetDevices()[0]->IsGattConnected());
+}
+#endif // defined(OS_MACOSX)
+
// TODO(scheib): Enable BluetoothTest fixture tests on all platforms.
#if defined(OS_ANDROID)
// Starts and Stops a discovery session.
« no previous file with comments | « device/bluetooth/bluetooth_adapter_mac.mm ('k') | device/bluetooth/bluetooth_low_energy_device_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698