Index: device/bluetooth/bluetooth_device_unittest.cc |
diff --git a/device/bluetooth/bluetooth_device_unittest.cc b/device/bluetooth/bluetooth_device_unittest.cc |
index 22ba74840241dddff0e52b7ab8baa57a9cd2d03b..9433fda99ef8071763ef0334f2aa22e896eafcfb 100644 |
--- a/device/bluetooth/bluetooth_device_unittest.cc |
+++ b/device/bluetooth/bluetooth_device_unittest.cc |
@@ -673,7 +673,7 @@ TEST_F(BluetoothTest, AdvertisementData_ConnectionDuringDiscovery) { |
} |
#endif // defined(OS_ANDROID) || defined(OS_MACOSX) |
-#if defined(OS_ANDROID) || defined(OS_MACOSX) |
+#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_MACOSX) |
// GetName for Device with no name. |
TEST_F(BluetoothTest, GetName_NullName) { |
if (!PlatformSupportsLowEnergy()) { |
@@ -681,11 +681,19 @@ TEST_F(BluetoothTest, GetName_NullName) { |
return; |
} |
InitWithFakeAdapter(); |
+ |
+// StartLowEnergyDiscoverySession is not yet implemented on ChromeOS|bluez, |
+// and is non trivial to implement. On ChromeOS, it is not essential for |
+// this test to operate, and so it is simply skipped. Android at least |
+// does require this step. |
+#if !defined(OS_CHROMEOS) |
StartLowEnergyDiscoverySession(); |
+#endif |
+ |
BluetoothDevice* device = SimulateLowEnergyDevice(5); |
EXPECT_FALSE(device->GetName()); |
} |
-#endif // defined(OS_ANDROID) || defined(OS_MACOSX) |
+#endif // defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_MACOSX) |
// TODO(506415): Test GetNameForDisplay with a device with no name. |
// BluetoothDevice::GetAddressWithLocalizedDeviceTypeName() will run, which |