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

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

Issue 1946053002: Fixes to DBus GATT components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/bluetooth_gatt_application_service_provider_unittest.cc
diff --git a/device/bluetooth/dbus/bluetooth_gatt_application_service_provider_unittest.cc b/device/bluetooth/dbus/bluetooth_gatt_application_service_provider_unittest.cc
index 2ed954ed76c8d685b834c0e0ff1ce0c89d91d34d..f8b31461ea996b18ab3d67ea23423e436999bff0 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_application_service_provider_unittest.cc
+++ b/device/bluetooth/dbus/bluetooth_gatt_application_service_provider_unittest.cc
@@ -30,14 +30,14 @@ const char kFakeDescriptorUuid[] = "00000000-0000-0000-0000-018390008000";
// and then manually verified to match the expected signature.
const char kExpectedMessage[] =
"message_type: MESSAGE_METHOD_RETURN\n"
- "signature: a(oa(sa{sv}))\n"
+ "signature: a{oa{sa{sv}}}\n"
"reply_serial: 123\n"
"\n"
"array [\n"
- " struct {\n"
+ " dict entry {\n"
" object_path \"/fake/hci0/gatt_application/service0\"\n"
" array [\n"
- " struct {\n"
+ " dict entry {\n"
" string \"org.bluez.GattService1\"\n"
" array [\n"
" dict entry {\n"
@@ -46,6 +46,10 @@ const char kExpectedMessage[] =
"\"00000000-0000-0000-0000-010040008000\"\n"
" }\n"
" dict entry {\n"
+ " string \"Primary\"\n"
+ " variant bool true\n"
+ " }\n"
+ " dict entry {\n"
" string \"Includes\"\n"
" variant array [\n"
" ]\n"
@@ -54,10 +58,10 @@ const char kExpectedMessage[] =
" }\n"
" ]\n"
" }\n"
- " struct {\n"
+ " dict entry {\n"
" object_path \"/fake/hci0/gatt_application/service1\"\n"
" array [\n"
- " struct {\n"
+ " dict entry {\n"
" string \"org.bluez.GattService1\"\n"
" array [\n"
" dict entry {\n"
@@ -66,6 +70,10 @@ const char kExpectedMessage[] =
"\"00000000-0000-0000-0000-010040008000\"\n"
" }\n"
" dict entry {\n"
+ " string \"Primary\"\n"
+ " variant bool true\n"
+ " }\n"
+ " dict entry {\n"
" string \"Includes\"\n"
" variant array [\n"
" ]\n"
@@ -74,10 +82,10 @@ const char kExpectedMessage[] =
" }\n"
" ]\n"
" }\n"
- " struct {\n"
+ " dict entry {\n"
" object_path \"/fake/hci0/gatt_application/service0/characteristic0\"\n"
" array [\n"
- " struct {\n"
+ " dict entry {\n"
" string \"org.bluez.GattCharacteristic1\"\n"
" array [\n"
" dict entry {\n"
@@ -94,10 +102,10 @@ const char kExpectedMessage[] =
" }\n"
" ]\n"
" }\n"
- " struct {\n"
+ " dict entry {\n"
" object_path \"/fake/hci0/gatt_application/service0/characteristic1\"\n"
" array [\n"
- " struct {\n"
+ " dict entry {\n"
" string \"org.bluez.GattCharacteristic1\"\n"
" array [\n"
" dict entry {\n"
@@ -114,10 +122,10 @@ const char kExpectedMessage[] =
" }\n"
" ]\n"
" }\n"
- " struct {\n"
+ " dict entry {\n"
" object_path \"/fake/hci0/gatt_application/service1/characteristic0\"\n"
" array [\n"
- " struct {\n"
+ " dict entry {\n"
" string \"org.bluez.GattCharacteristic1\"\n"
" array [\n"
" dict entry {\n"
@@ -134,11 +142,11 @@ const char kExpectedMessage[] =
" }\n"
" ]\n"
" }\n"
- " struct {\n"
+ " dict entry {\n"
" object_path "
"\"/fake/hci0/gatt_application/service0/characteristic0/descriptor0\"\n"
" array [\n"
- " struct {\n"
+ " dict entry {\n"
" string \"org.bluez.GattDescriptor1\"\n"
" array [\n"
" dict entry {\n"
@@ -155,11 +163,11 @@ const char kExpectedMessage[] =
" }\n"
" ]\n"
" }\n"
- " struct {\n"
+ " dict entry {\n"
" object_path "
"\"/fake/hci0/gatt_application/service0/characteristic1/descriptor1\"\n"
" array [\n"
- " struct {\n"
+ " dict entry {\n"
" string \"org.bluez.GattDescriptor1\"\n"
" array [\n"
" dict entry {\n"
@@ -176,11 +184,11 @@ const char kExpectedMessage[] =
" }\n"
" ]\n"
" }\n"
- " struct {\n"
+ " dict entry {\n"
" object_path "
"\"/fake/hci0/gatt_application/service1/characteristic0/descriptor2\"\n"
" array [\n"
- " struct {\n"
+ " dict entry {\n"
" string \"org.bluez.GattDescriptor1\"\n"
" array [\n"
" dict entry {\n"
@@ -197,11 +205,11 @@ const char kExpectedMessage[] =
" }\n"
" ]\n"
" }\n"
- " struct {\n"
+ " dict entry {\n"
" object_path "
"\"/fake/hci0/gatt_application/service0/characteristic0/descriptor3\"\n"
" array [\n"
- " struct {\n"
+ " dict entry {\n"
" string \"org.bluez.GattDescriptor1\"\n"
" array [\n"
" dict entry {\n"
@@ -237,7 +245,7 @@ class BluetoothGattApplicationServiceProviderTest : public testing::Test {
std::string(kAppObjectPath) + "/" + service_path;
app_provider->service_providers_.push_back(
base::WrapUnique(new BluetoothGattServiceServiceProviderImpl(
- dbus::ObjectPath(full_service_path), kFakeServiceUuid)));
+ dbus::ObjectPath(full_service_path), kFakeServiceUuid, true)));
return full_service_path;
}

Powered by Google App Engine
This is Rietveld 408576698