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

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 comment 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..384ee2d0553dda8098392932566143f9b10a3622 100644
--- a/components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc
+++ b/components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc
@@ -10,6 +10,7 @@
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
+#include "base/strings/stringprintf.h"
#include "components/arc/bluetooth/bluetooth_type_converters.h"
#include "components/arc/common/bluetooth.mojom.h"
#include "components/arc/test/fake_arc_bridge_service.h"
@@ -141,11 +142,13 @@ 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());
+
+ std::string uuid16_str =
+ base::StringPrintf("%04x", 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