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

Unified Diff: device/bluetooth/dbus/fake_bluetooth_device_client.cc

Issue 2783733002: Bluetooth: Add service data unit tests for chromeos (Closed)
Patch Set: Created 3 years, 9 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/dbus/fake_bluetooth_device_client.cc
diff --git a/device/bluetooth/dbus/fake_bluetooth_device_client.cc b/device/bluetooth/dbus/fake_bluetooth_device_client.cc
index 58f694f03cf6e3161e261e099f74dafe446a5215..2065db6a8b6071131047d521d931106fcd9e5a93 100644
--- a/device/bluetooth/dbus/fake_bluetooth_device_client.cc
+++ b/device/bluetooth/dbus/fake_bluetooth_device_client.cc
@@ -1775,7 +1775,8 @@ void FakeBluetoothDeviceClient::CreateTestDevice(
const std::string alias,
const std::string device_address,
const std::vector<std::string>& service_uuids,
- device::BluetoothTransport type) {
+ device::BluetoothTransport type,
+ const std::unordered_map<std::string, std::vector<uint8_t>>& service_data) {
// Create a random device path.
dbus::ObjectPath device_path;
std::string id;
@@ -1817,6 +1818,8 @@ void FakeBluetoothDeviceClient::CreateTestDevice(
NOTREACHED();
}
properties->type.set_valid(true);
+ properties->service_data.ReplaceValue(service_data);
+ properties->service_data.set_valid(true);
Miao 2017/03/28 22:56:40 The validity of |service_data| should depend on wh
xiaoyinh(OOO Sep 11-29) 2017/03/29 21:58:06 Done.
properties_map_.insert(std::make_pair(device_path, std::move(properties)));
device_list_.push_back(device_path);

Powered by Google App Engine
This is Rietveld 408576698