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

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

Issue 2511253002: arc: bluetooth: enable use_new_wrapper_types for bluetooth.mojom (Closed)
Patch Set: rebase to ToT Created 4 years, 1 month 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: components/arc/bluetooth/bluetooth_type_converters_unittest.cc
diff --git a/components/arc/bluetooth/bluetooth_type_converters_unittest.cc b/components/arc/bluetooth/bluetooth_type_converters_unittest.cc
index 6d379839ca341dfa65cf9d1621b9214689246926..74ebafd80c55fbe335709731ca96612013622c36 100644
--- a/components/arc/bluetooth/bluetooth_type_converters_unittest.cc
+++ b/components/arc/bluetooth/bluetooth_type_converters_unittest.cc
@@ -38,7 +38,7 @@ arc::mojom::BluetoothSdpAttributePtr CreateDeepMojoSequenceAttribute(
value->type = bluez::BluetoothServiceAttributeValueBlueZ::UINT;
value->type_size = static_cast<uint32_t>(sizeof(data));
value->value.AppendInteger(static_cast<int>(data));
- value->sequence = mojo::Array<arc::mojom::BluetoothSdpAttributePtr>::New(0);
+ value->sequence = std::vector<arc::mojom::BluetoothSdpAttributePtr>();
}
return value;
}
@@ -117,7 +117,7 @@ TEST(BluetoothTypeConvertorTest, ConvertMojoValueAttributeToBlueZAttribute) {
nulltypeAttributeMojo->type_size = 0;
nulltypeAttributeMojo->value.Append(base::Value::CreateNullValue());
nulltypeAttributeMojo->sequence =
- mojo::Array<arc::mojom::BluetoothSdpAttributePtr>::New(0);
+ std::vector<arc::mojom::BluetoothSdpAttributePtr>();
auto nulltypeAttributeBlueZ =
nulltypeAttributeMojo.To<bluez::BluetoothServiceAttributeValueBlueZ>();
@@ -134,8 +134,7 @@ TEST(BluetoothTypeConvertorTest, ConvertMojoValueAttributeToBlueZAttribute) {
boolAttributeMojo->type_size = static_cast<uint32_t>(sizeof(valueBool));
boolAttributeMojo->value.AppendBoolean(valueBool);
boolAttributeMojo->sequence =
- mojo::Array<arc::mojom::BluetoothSdpAttributePtr>::New(0);
-
+ std::vector<arc::mojom::BluetoothSdpAttributePtr>();
auto boolAttributeBlueZ =
boolAttributeMojo.To<bluez::BluetoothServiceAttributeValueBlueZ>();
@@ -154,7 +153,7 @@ TEST(BluetoothTypeConvertorTest, ConvertMojoValueAttributeToBlueZAttribute) {
uintAttributeMojo->type_size = static_cast<uint32_t>(sizeof(valueUint16));
uintAttributeMojo->value.AppendInteger(static_cast<int>(valueUint16));
uintAttributeMojo->sequence =
- mojo::Array<arc::mojom::BluetoothSdpAttributePtr>::New(0);
+ std::vector<arc::mojom::BluetoothSdpAttributePtr>();
auto uintAttributeBlueZ =
uintAttributeMojo.To<bluez::BluetoothServiceAttributeValueBlueZ>();
@@ -174,7 +173,7 @@ TEST(BluetoothTypeConvertorTest, ConvertMojoValueAttributeToBlueZAttribute) {
intAttributeMojo->type_size = static_cast<uint32_t>(sizeof(valueInt16));
intAttributeMojo->value.AppendInteger(static_cast<int>(valueInt16));
intAttributeMojo->sequence =
- mojo::Array<arc::mojom::BluetoothSdpAttributePtr>::New(0);
+ std::vector<arc::mojom::BluetoothSdpAttributePtr>();
auto intAttributeBlueZ =
intAttributeMojo.To<bluez::BluetoothServiceAttributeValueBlueZ>();
@@ -196,7 +195,7 @@ TEST(BluetoothTypeConvertorTest, ConvertMojoValueAttributeToBlueZAttribute) {
uuidAttributeMojo->type_size = static_cast<uint32_t>(sizeof(uint16_t));
uuidAttributeMojo->value.AppendString(expectedUUID);
uuidAttributeMojo->sequence =
- mojo::Array<arc::mojom::BluetoothSdpAttributePtr>::New(0);
+ std::vector<arc::mojom::BluetoothSdpAttributePtr>();
auto uuidAttributeBlueZ =
uuidAttributeMojo.To<bluez::BluetoothServiceAttributeValueBlueZ>();
@@ -219,7 +218,7 @@ TEST(BluetoothTypeConvertorTest, ConvertMojoValueAttributeToBlueZAttribute) {
static_cast<uint32_t>(expectedString.length());
stringAttributeMojo->value.AppendString(expectedString);
stringAttributeMojo->sequence =
- mojo::Array<arc::mojom::BluetoothSdpAttributePtr>::New(0);
+ std::vector<arc::mojom::BluetoothSdpAttributePtr>();
auto stringAttributeBlueZ =
stringAttributeMojo.To<bluez::BluetoothServiceAttributeValueBlueZ>();
@@ -239,8 +238,7 @@ TEST(BluetoothTypeConvertorTest, ConvertMojoSequenceAttributeToBlueZAttribute) {
valueUUID->type = bluez::BluetoothServiceAttributeValueBlueZ::UUID;
valueUUID->type_size = static_cast<uint32_t>(sizeof(uint16_t));
valueUUID->value.AppendString(l2capUUID);
- valueUUID->sequence =
- mojo::Array<arc::mojom::BluetoothSdpAttributePtr>::New(0);
+ valueUUID->sequence = std::vector<arc::mojom::BluetoothSdpAttributePtr>();
// Create an UINT value.
uint16_t l2capChannel = 3;
@@ -248,8 +246,7 @@ TEST(BluetoothTypeConvertorTest, ConvertMojoSequenceAttributeToBlueZAttribute) {
valueUint16->type = bluez::BluetoothServiceAttributeValueBlueZ::UINT;
valueUint16->type_size = static_cast<uint32_t>(sizeof(l2capChannel));
valueUint16->value.AppendInteger(static_cast<int>(l2capChannel));
- valueUint16->sequence =
- mojo::Array<arc::mojom::BluetoothSdpAttributePtr>::New(0);
+ valueUint16->sequence = std::vector<arc::mojom::BluetoothSdpAttributePtr>();
// Create a sequence with the above two values.
auto sequenceMojo = arc::mojom::BluetoothSdpAttribute::New();
@@ -289,8 +286,7 @@ TEST(BluetoothTypeConvertorTest,
valueNoData->type = bluez::BluetoothServiceAttributeValueBlueZ::UINT;
valueNoData->type_size = static_cast<uint32_t>(sizeof(uint32_t));
valueNoData->value.Clear();
- valueNoData->sequence =
- mojo::Array<arc::mojom::BluetoothSdpAttributePtr>::New(0);
+ valueNoData->sequence = std::vector<arc::mojom::BluetoothSdpAttributePtr>();
auto valueNoDataBlueZ =
valueNoData.To<bluez::BluetoothServiceAttributeValueBlueZ>();
@@ -309,7 +305,7 @@ TEST(BluetoothTypeConvertorTest,
sequenceNoData->type_size = 0;
sequenceNoData->value.Append(base::Value::CreateNullValue());
sequenceNoData->sequence =
Luis Héctor Chávez 2016/11/17 22:45:19 All these places where you're initializing to an e
puthik_chromium 2016/11/17 23:12:29 Done.
- mojo::Array<arc::mojom::BluetoothSdpAttributePtr>::New(0);
+ std::vector<arc::mojom::BluetoothSdpAttributePtr>();
auto sequenceNoDataBlueZ =
sequenceNoData.To<bluez::BluetoothServiceAttributeValueBlueZ>();

Powered by Google App Engine
This is Rietveld 408576698