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

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

Issue 2539363004: Make base::Value::TYPE a scoped enum. (Closed)
Patch Set: Rebase Created 4 years 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 | « chromeos/timezone/timezone_request.cc ('k') | components/autofill/core/browser/payments/payments_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5b61f8323a3250b09025852744c1b956df0f5d95..a045746849b8b9cd695b2b732f5c918dd55c357d 100644
--- a/components/arc/bluetooth/bluetooth_type_converters_unittest.cc
+++ b/components/arc/bluetooth/bluetooth_type_converters_unittest.cc
@@ -122,7 +122,7 @@ TEST(BluetoothTypeConvertorTest, ConvertMojoValueAttributeToBlueZAttribute) {
EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::NULLTYPE,
nulltypeAttributeBlueZ.type());
EXPECT_EQ(0u, nulltypeAttributeBlueZ.size());
- EXPECT_EQ(base::Value::TYPE_NULL, nulltypeAttributeBlueZ.value().GetType());
+ EXPECT_EQ(base::Value::Type::NONE, nulltypeAttributeBlueZ.value().GetType());
// Construct Mojo attribute with TYPE_BOOLEAN value.
bool valueBool = true;
@@ -136,7 +136,7 @@ TEST(BluetoothTypeConvertorTest, ConvertMojoValueAttributeToBlueZAttribute) {
EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::BOOL,
boolAttributeBlueZ.type());
EXPECT_EQ(sizeof(valueBool), boolAttributeBlueZ.size());
- EXPECT_EQ(base::Value::TYPE_BOOLEAN, boolAttributeBlueZ.value().GetType());
+ EXPECT_EQ(base::Value::Type::BOOLEAN, boolAttributeBlueZ.value().GetType());
EXPECT_TRUE(boolAttributeBlueZ.value().GetAsBoolean(&valueBool));
EXPECT_TRUE(valueBool);
@@ -154,7 +154,7 @@ TEST(BluetoothTypeConvertorTest, ConvertMojoValueAttributeToBlueZAttribute) {
EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::UINT,
uintAttributeBlueZ.type());
EXPECT_EQ(sizeof(valueUint16), uintAttributeBlueZ.size());
- EXPECT_EQ(base::Value::TYPE_INTEGER, uintAttributeBlueZ.value().GetType());
+ EXPECT_EQ(base::Value::Type::INTEGER, uintAttributeBlueZ.value().GetType());
EXPECT_TRUE(uintAttributeBlueZ.value().GetAsInteger(&valueUint16AsInt));
EXPECT_EQ(valueUint16, static_cast<uint16_t>(valueUint16AsInt));
@@ -172,7 +172,7 @@ TEST(BluetoothTypeConvertorTest, ConvertMojoValueAttributeToBlueZAttribute) {
EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::INT,
intAttributeBlueZ.type());
EXPECT_EQ(sizeof(valueInt16), intAttributeBlueZ.size());
- EXPECT_EQ(base::Value::TYPE_INTEGER, intAttributeBlueZ.value().GetType());
+ EXPECT_EQ(base::Value::Type::INTEGER, intAttributeBlueZ.value().GetType());
EXPECT_TRUE(intAttributeBlueZ.value().GetAsInteger(&valueInt16AsInt));
EXPECT_EQ(valueInt16, static_cast<int16_t>(valueInt16AsInt));
@@ -192,7 +192,7 @@ TEST(BluetoothTypeConvertorTest, ConvertMojoValueAttributeToBlueZAttribute) {
EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::UUID,
uuidAttributeBlueZ.type());
EXPECT_EQ(sizeof(uint16_t), uuidAttributeBlueZ.size());
- EXPECT_EQ(base::Value::TYPE_STRING, uuidAttributeBlueZ.value().GetType());
+ EXPECT_EQ(base::Value::Type::STRING, uuidAttributeBlueZ.value().GetType());
EXPECT_TRUE(uuidAttributeBlueZ.value().GetAsString(&actualUUID));
EXPECT_EQ(expectedUUID, actualUUID);
@@ -213,7 +213,7 @@ TEST(BluetoothTypeConvertorTest, ConvertMojoValueAttributeToBlueZAttribute) {
EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::STRING,
stringAttributeBlueZ.type());
EXPECT_EQ(expectedString.length(), stringAttributeBlueZ.size());
- EXPECT_EQ(base::Value::TYPE_STRING, stringAttributeBlueZ.value().GetType());
+ EXPECT_EQ(base::Value::Type::STRING, stringAttributeBlueZ.value().GetType());
EXPECT_TRUE(stringAttributeBlueZ.value().GetAsString(&actualString));
EXPECT_EQ(expectedString, actualString);
}
@@ -278,7 +278,7 @@ TEST(BluetoothTypeConvertorTest,
EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::NULLTYPE,
valueNoDataBlueZ.type());
EXPECT_EQ(0u, valueNoDataBlueZ.size());
- EXPECT_EQ(base::Value::TYPE_NULL, valueNoDataBlueZ.value().GetType());
+ EXPECT_EQ(base::Value::Type::NONE, valueNoDataBlueZ.value().GetType());
}
TEST(BluetoothTypeConvertorTest,
@@ -295,7 +295,7 @@ TEST(BluetoothTypeConvertorTest,
EXPECT_EQ(bluez::BluetoothServiceAttributeValueBlueZ::NULLTYPE,
sequenceNoDataBlueZ.type());
EXPECT_EQ(0u, sequenceNoDataBlueZ.size());
- EXPECT_EQ(base::Value::TYPE_NULL, sequenceNoDataBlueZ.value().GetType());
+ EXPECT_EQ(base::Value::Type::NONE, sequenceNoDataBlueZ.value().GetType());
// Create a Mojo attribute with the depth = arc::kBluetoothSDPMaxDepth + 3.
auto sequenceTooDeepMojo =
@@ -322,7 +322,7 @@ TEST(BluetoothTypeConvertorTest, ConvertBlueZValueAttributeToMojoAttribute) {
nulltypeAttributeMojo->type);
EXPECT_EQ(0u, nulltypeAttributeMojo->type_size);
EXPECT_TRUE(nulltypeAttributeMojo->value.Get(0, &actualValue));
- EXPECT_EQ(base::Value::TYPE_NULL, actualValue->GetType());
+ EXPECT_EQ(base::Value::Type::NONE, actualValue->GetType());
// Check integer types (INT, UINT).
uint16_t valueUint16 = 10;
« no previous file with comments | « chromeos/timezone/timezone_request.cc ('k') | components/autofill/core/browser/payments/payments_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698