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

Unified Diff: device/bluetooth/bluetooth_device_unittest.cc

Issue 2440043002: bluetooth: bluez: GetName uses 'name' instead of 'alias'. (Closed)
Patch Set: Android needs StartLowEnergyDiscoverySession; Browser test needs s/alias/name/ Created 4 years, 1 month 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_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

Powered by Google App Engine
This is Rietveld 408576698