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

Unified Diff: device/bluetooth/bluetooth_device_unittest.cc

Issue 2640883002: Enable more unittests for BlueZ and ChromeOS. (Closed)
Patch Set: Added comment in TearDown. Created 3 years, 11 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_device_unittest.cc
diff --git a/device/bluetooth/bluetooth_device_unittest.cc b/device/bluetooth/bluetooth_device_unittest.cc
index 85c8c9a97aa44fc480e67d253307a5067299e1da..01ed7837171d346f8820798fda8959b4a24244a9 100644
--- a/device/bluetooth/bluetooth_device_unittest.cc
+++ b/device/bluetooth/bluetooth_device_unittest.cc
@@ -93,7 +93,6 @@ TEST(BluetoothDeviceTest, CanonicalizeAddressFormat_RejectsInvalidFormats) {
}
}
-#if defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
// Verifies basic device properties, e.g. GetAddress, GetName, ...
TEST_F(BluetoothTest, LowEnergyDeviceProperties) {
if (!PlatformSupportsLowEnergy()) {
@@ -120,9 +119,7 @@ TEST_F(BluetoothTest, LowEnergyDeviceProperties) {
EXPECT_TRUE(
base::ContainsKey(uuids, BluetoothUUID(kTestUUIDGenericAttribute)));
}
-#endif // defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
-#if defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
// Device with no advertised Service UUIDs.
TEST_F(BluetoothTest, LowEnergyDeviceNoUUIDs) {
if (!PlatformSupportsLowEnergy()) {
@@ -136,7 +133,6 @@ TEST_F(BluetoothTest, LowEnergyDeviceNoUUIDs) {
UUIDSet uuids = device->GetUUIDs();
EXPECT_EQ(0u, uuids.size());
}
-#endif // defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
#if defined(OS_MACOSX)
// TODO(ortuno): Enable on Android once it supports Service Data.
@@ -677,7 +673,8 @@ TEST_F(BluetoothTest, AdvertisementData_ConnectionDuringDiscovery) {
}
#endif // defined(OS_ANDROID) || defined(OS_MACOSX)
-#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_MACOSX)
+#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_MACOSX) || \
+ defined(OS_LINUX)
// GetName for Device with no name.
TEST_F(BluetoothTest, GetName_NullName) {
if (!PlatformSupportsLowEnergy()) {
@@ -697,7 +694,8 @@ TEST_F(BluetoothTest, GetName_NullName) {
BluetoothDevice* device = SimulateLowEnergyDevice(5);
EXPECT_FALSE(device->GetName());
}
-#endif // defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_MACOSX)
+#endif // defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_MACOSX) ||
+ // defined(OS_LINUX)
// TODO(506415): Test GetNameForDisplay with a device with no name.
// BluetoothDevice::GetAddressWithLocalizedDeviceTypeName() will run, which
« no previous file with comments | « device/bluetooth/bluetooth_adapter_unittest.cc ('k') | device/bluetooth/dbus/fake_bluetooth_device_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698