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

Unified Diff: device/bluetooth/bluetooth_device_unittest.cc

Issue 2009753002: bluetooth: Make public BluetoothDevice::GetName method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: split out name/alias Created 4 years, 5 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_device_android.cc ('k') | device/bluetooth/bluetooth_device_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_device_unittest.cc
diff --git a/device/bluetooth/bluetooth_device_unittest.cc b/device/bluetooth/bluetooth_device_unittest.cc
index af9b021540be04a823b35524d3535072f2cdd8f5..2232c7ce564f557c8cf262e594ac6581f07d0b57 100644
--- a/device/bluetooth/bluetooth_device_unittest.cc
+++ b/device/bluetooth/bluetooth_device_unittest.cc
@@ -117,9 +117,9 @@ TEST_F(BluetoothTest, LowEnergyDeviceNoUUIDs) {
}
#endif // defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
-#if defined(OS_ANDROID)
-// GetDeviceName for Device with no name.
-TEST_F(BluetoothTest, GetDeviceName_NullName) {
+#if defined(OS_ANDROID) || defined(OS_MACOSX)
+// GetName for Device with no name.
+TEST_F(BluetoothTest, GetName_NullName) {
if (!PlatformSupportsLowEnergy()) {
LOG(WARNING) << "Low Energy Bluetooth unavailable, skipping unit test.";
return;
@@ -127,11 +127,11 @@ TEST_F(BluetoothTest, GetDeviceName_NullName) {
InitWithFakeAdapter();
StartLowEnergyDiscoverySession();
BluetoothDevice* device = SimulateLowEnergyDevice(5);
- EXPECT_EQ("", device->GetDeviceName());
+ EXPECT_FALSE(device->GetName());
}
-#endif // defined(OS_ANDROID)
+#endif // defined(OS_ANDROID) || defined(OS_MACOSX)
-// TODO(scheib): Test with a device with no name. http://crbug.com/506415
+// TODO(506415): Test GetNameForDisplay with a device with no name.
// BluetoothDevice::GetAddressWithLocalizedDeviceTypeName() will run, which
// requires string resources to be loaded. For that, something like
// InitSharedInstance must be run. See unittest files that call that. It will
« no previous file with comments | « device/bluetooth/bluetooth_device_android.cc ('k') | device/bluetooth/bluetooth_device_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698