OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/arc/bluetooth/bluetooth_type_converters.h" | 5 #include "components/arc/bluetooth/bluetooth_type_converters.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 bluez::BluetoothServiceAttributeValueBlueZ::NULLTYPE; | 115 bluez::BluetoothServiceAttributeValueBlueZ::NULLTYPE; |
116 nulltypeAttributeMojo->type_size = 0; | 116 nulltypeAttributeMojo->type_size = 0; |
117 nulltypeAttributeMojo->value.Append(base::Value::CreateNullValue()); | 117 nulltypeAttributeMojo->value.Append(base::Value::CreateNullValue()); |
118 | 118 |
119 auto nulltypeAttributeBlueZ = | 119 auto nulltypeAttributeBlueZ = |
120 nulltypeAttributeMojo.To<bluez::BluetoothServiceAttributeValueBlueZ>(); | 120 nulltypeAttributeMojo.To<bluez::BluetoothServiceAttributeValueBlueZ>(); |
121 | 121 |
122 EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::NULLTYPE, | 122 EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::NULLTYPE, |
123 nulltypeAttributeBlueZ.type()); | 123 nulltypeAttributeBlueZ.type()); |
124 EXPECT_EQ(0u, nulltypeAttributeBlueZ.size()); | 124 EXPECT_EQ(0u, nulltypeAttributeBlueZ.size()); |
125 EXPECT_EQ(base::Value::TYPE_NULL, nulltypeAttributeBlueZ.value().GetType()); | 125 EXPECT_EQ(base::Value::Type::NONE, nulltypeAttributeBlueZ.value().GetType()); |
126 | 126 |
127 // Construct Mojo attribute with TYPE_BOOLEAN value. | 127 // Construct Mojo attribute with TYPE_BOOLEAN value. |
128 bool valueBool = true; | 128 bool valueBool = true; |
129 auto boolAttributeMojo = arc::mojom::BluetoothSdpAttribute::New(); | 129 auto boolAttributeMojo = arc::mojom::BluetoothSdpAttribute::New(); |
130 boolAttributeMojo->type = bluez::BluetoothServiceAttributeValueBlueZ::BOOL; | 130 boolAttributeMojo->type = bluez::BluetoothServiceAttributeValueBlueZ::BOOL; |
131 boolAttributeMojo->type_size = static_cast<uint32_t>(sizeof(valueBool)); | 131 boolAttributeMojo->type_size = static_cast<uint32_t>(sizeof(valueBool)); |
132 boolAttributeMojo->value.AppendBoolean(valueBool); | 132 boolAttributeMojo->value.AppendBoolean(valueBool); |
133 auto boolAttributeBlueZ = | 133 auto boolAttributeBlueZ = |
134 boolAttributeMojo.To<bluez::BluetoothServiceAttributeValueBlueZ>(); | 134 boolAttributeMojo.To<bluez::BluetoothServiceAttributeValueBlueZ>(); |
135 | 135 |
136 EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::BOOL, | 136 EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::BOOL, |
137 boolAttributeBlueZ.type()); | 137 boolAttributeBlueZ.type()); |
138 EXPECT_EQ(sizeof(valueBool), boolAttributeBlueZ.size()); | 138 EXPECT_EQ(sizeof(valueBool), boolAttributeBlueZ.size()); |
139 EXPECT_EQ(base::Value::TYPE_BOOLEAN, boolAttributeBlueZ.value().GetType()); | 139 EXPECT_EQ(base::Value::Type::BOOLEAN, boolAttributeBlueZ.value().GetType()); |
140 EXPECT_TRUE(boolAttributeBlueZ.value().GetAsBoolean(&valueBool)); | 140 EXPECT_TRUE(boolAttributeBlueZ.value().GetAsBoolean(&valueBool)); |
141 EXPECT_TRUE(valueBool); | 141 EXPECT_TRUE(valueBool); |
142 | 142 |
143 // Construct Mojo attribute with TYPE_UINT value. | 143 // Construct Mojo attribute with TYPE_UINT value. |
144 uint16_t valueUint16 = 10; | 144 uint16_t valueUint16 = 10; |
145 int valueUint16AsInt = 0; | 145 int valueUint16AsInt = 0; |
146 auto uintAttributeMojo = arc::mojom::BluetoothSdpAttribute::New(); | 146 auto uintAttributeMojo = arc::mojom::BluetoothSdpAttribute::New(); |
147 uintAttributeMojo->type = bluez::BluetoothServiceAttributeValueBlueZ::UINT; | 147 uintAttributeMojo->type = bluez::BluetoothServiceAttributeValueBlueZ::UINT; |
148 uintAttributeMojo->type_size = static_cast<uint32_t>(sizeof(valueUint16)); | 148 uintAttributeMojo->type_size = static_cast<uint32_t>(sizeof(valueUint16)); |
149 uintAttributeMojo->value.AppendInteger(static_cast<int>(valueUint16)); | 149 uintAttributeMojo->value.AppendInteger(static_cast<int>(valueUint16)); |
150 | 150 |
151 auto uintAttributeBlueZ = | 151 auto uintAttributeBlueZ = |
152 uintAttributeMojo.To<bluez::BluetoothServiceAttributeValueBlueZ>(); | 152 uintAttributeMojo.To<bluez::BluetoothServiceAttributeValueBlueZ>(); |
153 | 153 |
154 EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::UINT, | 154 EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::UINT, |
155 uintAttributeBlueZ.type()); | 155 uintAttributeBlueZ.type()); |
156 EXPECT_EQ(sizeof(valueUint16), uintAttributeBlueZ.size()); | 156 EXPECT_EQ(sizeof(valueUint16), uintAttributeBlueZ.size()); |
157 EXPECT_EQ(base::Value::TYPE_INTEGER, uintAttributeBlueZ.value().GetType()); | 157 EXPECT_EQ(base::Value::Type::INTEGER, uintAttributeBlueZ.value().GetType()); |
158 EXPECT_TRUE(uintAttributeBlueZ.value().GetAsInteger(&valueUint16AsInt)); | 158 EXPECT_TRUE(uintAttributeBlueZ.value().GetAsInteger(&valueUint16AsInt)); |
159 EXPECT_EQ(valueUint16, static_cast<uint16_t>(valueUint16AsInt)); | 159 EXPECT_EQ(valueUint16, static_cast<uint16_t>(valueUint16AsInt)); |
160 | 160 |
161 // Construct Mojo attribute with TYPE_INT value. | 161 // Construct Mojo attribute with TYPE_INT value. |
162 int16_t valueInt16 = 20; | 162 int16_t valueInt16 = 20; |
163 int valueInt16AsInt = 0; | 163 int valueInt16AsInt = 0; |
164 auto intAttributeMojo = arc::mojom::BluetoothSdpAttribute::New(); | 164 auto intAttributeMojo = arc::mojom::BluetoothSdpAttribute::New(); |
165 intAttributeMojo->type = bluez::BluetoothServiceAttributeValueBlueZ::INT; | 165 intAttributeMojo->type = bluez::BluetoothServiceAttributeValueBlueZ::INT; |
166 intAttributeMojo->type_size = static_cast<uint32_t>(sizeof(valueInt16)); | 166 intAttributeMojo->type_size = static_cast<uint32_t>(sizeof(valueInt16)); |
167 intAttributeMojo->value.AppendInteger(static_cast<int>(valueInt16)); | 167 intAttributeMojo->value.AppendInteger(static_cast<int>(valueInt16)); |
168 | 168 |
169 auto intAttributeBlueZ = | 169 auto intAttributeBlueZ = |
170 intAttributeMojo.To<bluez::BluetoothServiceAttributeValueBlueZ>(); | 170 intAttributeMojo.To<bluez::BluetoothServiceAttributeValueBlueZ>(); |
171 | 171 |
172 EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::INT, | 172 EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::INT, |
173 intAttributeBlueZ.type()); | 173 intAttributeBlueZ.type()); |
174 EXPECT_EQ(sizeof(valueInt16), intAttributeBlueZ.size()); | 174 EXPECT_EQ(sizeof(valueInt16), intAttributeBlueZ.size()); |
175 EXPECT_EQ(base::Value::TYPE_INTEGER, intAttributeBlueZ.value().GetType()); | 175 EXPECT_EQ(base::Value::Type::INTEGER, intAttributeBlueZ.value().GetType()); |
176 EXPECT_TRUE(intAttributeBlueZ.value().GetAsInteger(&valueInt16AsInt)); | 176 EXPECT_TRUE(intAttributeBlueZ.value().GetAsInteger(&valueInt16AsInt)); |
177 EXPECT_EQ(valueInt16, static_cast<int16_t>(valueInt16AsInt)); | 177 EXPECT_EQ(valueInt16, static_cast<int16_t>(valueInt16AsInt)); |
178 | 178 |
179 // Construct Mojo attribute with TYPE_UUID. | 179 // Construct Mojo attribute with TYPE_UUID. |
180 std::string expectedUUID("00000000-0000-1000-8000-00805f9b34fb"); | 180 std::string expectedUUID("00000000-0000-1000-8000-00805f9b34fb"); |
181 std::string actualUUID; | 181 std::string actualUUID; |
182 auto uuidAttributeMojo = arc::mojom::BluetoothSdpAttribute::New(); | 182 auto uuidAttributeMojo = arc::mojom::BluetoothSdpAttribute::New(); |
183 uuidAttributeMojo->type = bluez::BluetoothServiceAttributeValueBlueZ::UUID; | 183 uuidAttributeMojo->type = bluez::BluetoothServiceAttributeValueBlueZ::UUID; |
184 // UUIDs are all stored in string form, but it can be converted to one of | 184 // UUIDs are all stored in string form, but it can be converted to one of |
185 // UUID16, UUID32 and UUID128. | 185 // UUID16, UUID32 and UUID128. |
186 uuidAttributeMojo->type_size = static_cast<uint32_t>(sizeof(uint16_t)); | 186 uuidAttributeMojo->type_size = static_cast<uint32_t>(sizeof(uint16_t)); |
187 uuidAttributeMojo->value.AppendString(expectedUUID); | 187 uuidAttributeMojo->value.AppendString(expectedUUID); |
188 | 188 |
189 auto uuidAttributeBlueZ = | 189 auto uuidAttributeBlueZ = |
190 uuidAttributeMojo.To<bluez::BluetoothServiceAttributeValueBlueZ>(); | 190 uuidAttributeMojo.To<bluez::BluetoothServiceAttributeValueBlueZ>(); |
191 | 191 |
192 EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::UUID, | 192 EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::UUID, |
193 uuidAttributeBlueZ.type()); | 193 uuidAttributeBlueZ.type()); |
194 EXPECT_EQ(sizeof(uint16_t), uuidAttributeBlueZ.size()); | 194 EXPECT_EQ(sizeof(uint16_t), uuidAttributeBlueZ.size()); |
195 EXPECT_EQ(base::Value::TYPE_STRING, uuidAttributeBlueZ.value().GetType()); | 195 EXPECT_EQ(base::Value::Type::STRING, uuidAttributeBlueZ.value().GetType()); |
196 EXPECT_TRUE(uuidAttributeBlueZ.value().GetAsString(&actualUUID)); | 196 EXPECT_TRUE(uuidAttributeBlueZ.value().GetAsString(&actualUUID)); |
197 EXPECT_EQ(expectedUUID, actualUUID); | 197 EXPECT_EQ(expectedUUID, actualUUID); |
198 | 198 |
199 // Construct Mojo attribute with TYPE_STRING. TYPE_URL is the same case as | 199 // Construct Mojo attribute with TYPE_STRING. TYPE_URL is the same case as |
200 // TYPE_STRING. | 200 // TYPE_STRING. |
201 std::string expectedString("Some SDP service"); | 201 std::string expectedString("Some SDP service"); |
202 std::string actualString; | 202 std::string actualString; |
203 auto stringAttributeMojo = arc::mojom::BluetoothSdpAttribute::New(); | 203 auto stringAttributeMojo = arc::mojom::BluetoothSdpAttribute::New(); |
204 stringAttributeMojo->type = | 204 stringAttributeMojo->type = |
205 bluez::BluetoothServiceAttributeValueBlueZ::STRING; | 205 bluez::BluetoothServiceAttributeValueBlueZ::STRING; |
206 stringAttributeMojo->type_size = | 206 stringAttributeMojo->type_size = |
207 static_cast<uint32_t>(expectedString.length()); | 207 static_cast<uint32_t>(expectedString.length()); |
208 stringAttributeMojo->value.AppendString(expectedString); | 208 stringAttributeMojo->value.AppendString(expectedString); |
209 | 209 |
210 auto stringAttributeBlueZ = | 210 auto stringAttributeBlueZ = |
211 stringAttributeMojo.To<bluez::BluetoothServiceAttributeValueBlueZ>(); | 211 stringAttributeMojo.To<bluez::BluetoothServiceAttributeValueBlueZ>(); |
212 | 212 |
213 EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::STRING, | 213 EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::STRING, |
214 stringAttributeBlueZ.type()); | 214 stringAttributeBlueZ.type()); |
215 EXPECT_EQ(expectedString.length(), stringAttributeBlueZ.size()); | 215 EXPECT_EQ(expectedString.length(), stringAttributeBlueZ.size()); |
216 EXPECT_EQ(base::Value::TYPE_STRING, stringAttributeBlueZ.value().GetType()); | 216 EXPECT_EQ(base::Value::Type::STRING, stringAttributeBlueZ.value().GetType()); |
217 EXPECT_TRUE(stringAttributeBlueZ.value().GetAsString(&actualString)); | 217 EXPECT_TRUE(stringAttributeBlueZ.value().GetAsString(&actualString)); |
218 EXPECT_EQ(expectedString, actualString); | 218 EXPECT_EQ(expectedString, actualString); |
219 } | 219 } |
220 | 220 |
221 TEST(BluetoothTypeConvertorTest, ConvertMojoSequenceAttributeToBlueZAttribute) { | 221 TEST(BluetoothTypeConvertorTest, ConvertMojoSequenceAttributeToBlueZAttribute) { |
222 // Create an UUID value. | 222 // Create an UUID value. |
223 std::string l2capUUID("00000100-0000-1000-8000-00805f9b34fb"); | 223 std::string l2capUUID("00000100-0000-1000-8000-00805f9b34fb"); |
224 auto valueUUID = arc::mojom::BluetoothSdpAttribute::New(); | 224 auto valueUUID = arc::mojom::BluetoothSdpAttribute::New(); |
225 valueUUID->type = bluez::BluetoothServiceAttributeValueBlueZ::UUID; | 225 valueUUID->type = bluez::BluetoothServiceAttributeValueBlueZ::UUID; |
226 valueUUID->type_size = static_cast<uint32_t>(sizeof(uint16_t)); | 226 valueUUID->type_size = static_cast<uint32_t>(sizeof(uint16_t)); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 valueNoData->type = bluez::BluetoothServiceAttributeValueBlueZ::UINT; | 271 valueNoData->type = bluez::BluetoothServiceAttributeValueBlueZ::UINT; |
272 valueNoData->type_size = static_cast<uint32_t>(sizeof(uint32_t)); | 272 valueNoData->type_size = static_cast<uint32_t>(sizeof(uint32_t)); |
273 valueNoData->value.Clear(); | 273 valueNoData->value.Clear(); |
274 | 274 |
275 auto valueNoDataBlueZ = | 275 auto valueNoDataBlueZ = |
276 valueNoData.To<bluez::BluetoothServiceAttributeValueBlueZ>(); | 276 valueNoData.To<bluez::BluetoothServiceAttributeValueBlueZ>(); |
277 | 277 |
278 EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::NULLTYPE, | 278 EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::NULLTYPE, |
279 valueNoDataBlueZ.type()); | 279 valueNoDataBlueZ.type()); |
280 EXPECT_EQ(0u, valueNoDataBlueZ.size()); | 280 EXPECT_EQ(0u, valueNoDataBlueZ.size()); |
281 EXPECT_EQ(base::Value::TYPE_NULL, valueNoDataBlueZ.value().GetType()); | 281 EXPECT_EQ(base::Value::Type::NONE, valueNoDataBlueZ.value().GetType()); |
282 } | 282 } |
283 | 283 |
284 TEST(BluetoothTypeConvertorTest, | 284 TEST(BluetoothTypeConvertorTest, |
285 ConvertInvalidMojoSequenceAttributeToBlueZAttribute) { | 285 ConvertInvalidMojoSequenceAttributeToBlueZAttribute) { |
286 // Create a Mojo attribute with an empty sequence. | 286 // Create a Mojo attribute with an empty sequence. |
287 auto sequenceNoData = arc::mojom::BluetoothSdpAttribute::New(); | 287 auto sequenceNoData = arc::mojom::BluetoothSdpAttribute::New(); |
288 sequenceNoData->type = bluez::BluetoothServiceAttributeValueBlueZ::SEQUENCE; | 288 sequenceNoData->type = bluez::BluetoothServiceAttributeValueBlueZ::SEQUENCE; |
289 sequenceNoData->type_size = 0; | 289 sequenceNoData->type_size = 0; |
290 sequenceNoData->value.Append(base::Value::CreateNullValue()); | 290 sequenceNoData->value.Append(base::Value::CreateNullValue()); |
291 | 291 |
292 auto sequenceNoDataBlueZ = | 292 auto sequenceNoDataBlueZ = |
293 sequenceNoData.To<bluez::BluetoothServiceAttributeValueBlueZ>(); | 293 sequenceNoData.To<bluez::BluetoothServiceAttributeValueBlueZ>(); |
294 | 294 |
295 EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::NULLTYPE, | 295 EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::NULLTYPE, |
296 sequenceNoDataBlueZ.type()); | 296 sequenceNoDataBlueZ.type()); |
297 EXPECT_EQ(0u, sequenceNoDataBlueZ.size()); | 297 EXPECT_EQ(0u, sequenceNoDataBlueZ.size()); |
298 EXPECT_EQ(base::Value::TYPE_NULL, sequenceNoDataBlueZ.value().GetType()); | 298 EXPECT_EQ(base::Value::Type::NONE, sequenceNoDataBlueZ.value().GetType()); |
299 | 299 |
300 // Create a Mojo attribute with the depth = arc::kBluetoothSDPMaxDepth + 3. | 300 // Create a Mojo attribute with the depth = arc::kBluetoothSDPMaxDepth + 3. |
301 auto sequenceTooDeepMojo = | 301 auto sequenceTooDeepMojo = |
302 CreateDeepMojoSequenceAttribute(arc::kBluetoothSDPMaxDepth + 3); | 302 CreateDeepMojoSequenceAttribute(arc::kBluetoothSDPMaxDepth + 3); |
303 auto sequenceTooDeepBlueZ = | 303 auto sequenceTooDeepBlueZ = |
304 sequenceTooDeepMojo.To<bluez::BluetoothServiceAttributeValueBlueZ>(); | 304 sequenceTooDeepMojo.To<bluez::BluetoothServiceAttributeValueBlueZ>(); |
305 | 305 |
306 EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::SEQUENCE, | 306 EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::SEQUENCE, |
307 sequenceTooDeepBlueZ.type()); | 307 sequenceTooDeepBlueZ.type()); |
308 EXPECT_EQ(1u, sequenceTooDeepBlueZ.size()); | 308 EXPECT_EQ(1u, sequenceTooDeepBlueZ.size()); |
309 EXPECT_EQ(arc::kBluetoothSDPMaxDepth, | 309 EXPECT_EQ(arc::kBluetoothSDPMaxDepth, |
310 GetDepthOfBlueZAttribute(sequenceTooDeepBlueZ)); | 310 GetDepthOfBlueZAttribute(sequenceTooDeepBlueZ)); |
311 } | 311 } |
312 | 312 |
313 TEST(BluetoothTypeConvertorTest, ConvertBlueZValueAttributeToMojoAttribute) { | 313 TEST(BluetoothTypeConvertorTest, ConvertBlueZValueAttributeToMojoAttribute) { |
314 // Check NULL type. | 314 // Check NULL type. |
315 auto nulltypeAttributeBlueZ = bluez::BluetoothServiceAttributeValueBlueZ(); | 315 auto nulltypeAttributeBlueZ = bluez::BluetoothServiceAttributeValueBlueZ(); |
316 base::Value* actualValue; | 316 base::Value* actualValue; |
317 | 317 |
318 auto nulltypeAttributeMojo = | 318 auto nulltypeAttributeMojo = |
319 ConvertTo<arc::mojom::BluetoothSdpAttributePtr>(nulltypeAttributeBlueZ); | 319 ConvertTo<arc::mojom::BluetoothSdpAttributePtr>(nulltypeAttributeBlueZ); |
320 | 320 |
321 EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::NULLTYPE, | 321 EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::NULLTYPE, |
322 nulltypeAttributeMojo->type); | 322 nulltypeAttributeMojo->type); |
323 EXPECT_EQ(0u, nulltypeAttributeMojo->type_size); | 323 EXPECT_EQ(0u, nulltypeAttributeMojo->type_size); |
324 EXPECT_TRUE(nulltypeAttributeMojo->value.Get(0, &actualValue)); | 324 EXPECT_TRUE(nulltypeAttributeMojo->value.Get(0, &actualValue)); |
325 EXPECT_EQ(base::Value::TYPE_NULL, actualValue->GetType()); | 325 EXPECT_EQ(base::Value::Type::NONE, actualValue->GetType()); |
326 | 326 |
327 // Check integer types (INT, UINT). | 327 // Check integer types (INT, UINT). |
328 uint16_t valueUint16 = 10; | 328 uint16_t valueUint16 = 10; |
329 int valueUint16AsInt; | 329 int valueUint16AsInt; |
330 auto uintAttributeBlueZ = bluez::BluetoothServiceAttributeValueBlueZ( | 330 auto uintAttributeBlueZ = bluez::BluetoothServiceAttributeValueBlueZ( |
331 bluez::BluetoothServiceAttributeValueBlueZ::UINT, sizeof(valueUint16), | 331 bluez::BluetoothServiceAttributeValueBlueZ::UINT, sizeof(valueUint16), |
332 base::MakeUnique<base::FundamentalValue>( | 332 base::MakeUnique<base::FundamentalValue>( |
333 base::FundamentalValue(static_cast<int>(valueUint16)))); | 333 base::FundamentalValue(static_cast<int>(valueUint16)))); |
334 | 334 |
335 auto uintAttributeMojo = | 335 auto uintAttributeMojo = |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 auto sequenceMojo = | 447 auto sequenceMojo = |
448 ConvertTo<arc::mojom::BluetoothSdpAttributePtr>(sequenceBlueZ); | 448 ConvertTo<arc::mojom::BluetoothSdpAttributePtr>(sequenceBlueZ); |
449 | 449 |
450 EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::SEQUENCE, | 450 EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::SEQUENCE, |
451 sequenceMojo->type); | 451 sequenceMojo->type); |
452 EXPECT_EQ((uint32_t)1, sequenceMojo->type_size); | 452 EXPECT_EQ((uint32_t)1, sequenceMojo->type_size); |
453 EXPECT_EQ(arc::kBluetoothSDPMaxDepth, GetDepthOfMojoAttribute(sequenceMojo)); | 453 EXPECT_EQ(arc::kBluetoothSDPMaxDepth, GetDepthOfMojoAttribute(sequenceMojo)); |
454 } | 454 } |
455 | 455 |
456 } // namespace mojo | 456 } // namespace mojo |
OLD | NEW |