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

Unified Diff: components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc

Issue 2204263003: arc: bluetooth: Use UUID 16 bits in advertising data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test + rebase to crrev.com/2244703005 Created 4 years, 4 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 | « components/arc/bluetooth/arc_bluetooth_bridge.cc ('k') | components/arc/common/bluetooth.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc
diff --git a/components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc b/components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc
index 3796352bae163ceb3530cdd09b17e419323c3191..69b32f48e400825131625b38bc312e9ae8683895 100644
--- a/components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc
+++ b/components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc
@@ -141,11 +141,14 @@ TEST_F(ArcBluetoothBridgeTest, LEDeviceFound) {
EXPECT_EQ(std::string(bluez::FakeBluetoothDeviceClient::kLowEnergyName),
adv_data[0]->get_local_name().To<std::string>());
- EXPECT_TRUE(adv_data[1]->is_service_uuids());
- EXPECT_EQ(1u, adv_data[1]->get_service_uuids().size());
- EXPECT_EQ(device::BluetoothUUID(
- bluez::FakeBluetoothGattServiceClient::kHeartRateServiceUUID),
- adv_data[1]->get_service_uuids()[0].To<device::BluetoothUUID>());
+ EXPECT_TRUE(adv_data[1]->is_service_uuids_16());
+ EXPECT_EQ(1u, adv_data[1]->get_service_uuids_16().size());
+
+ char uuid16_str[5];
+ snprintf(uuid16_str, sizeof(uuid16_str), "%04x",
Luis Héctor Chávez 2016/08/15 22:47:13 nit: prefer base::StringPrintf("%04x", ...) over s
puthik_chromium 2016/08/15 23:19:20 Done.
+ adv_data[1]->get_service_uuids_16()[0]);
+ EXPECT_EQ(bluez::FakeBluetoothGattServiceClient::kHeartRateServiceUUID,
+ device::BluetoothUUID(uuid16_str).canonical_value());
}
// Invoke GetGattDB and check correctness of the GattDB sent via arc bridge.
« no previous file with comments | « components/arc/bluetooth/arc_bluetooth_bridge.cc ('k') | components/arc/common/bluetooth.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698