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

Unified Diff: tools/json_schema_compiler/test/error_generation_unittest.cc

Issue 116543010: Remove the Value class names from the global namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 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
Index: tools/json_schema_compiler/test/error_generation_unittest.cc
diff --git a/tools/json_schema_compiler/test/error_generation_unittest.cc b/tools/json_schema_compiler/test/error_generation_unittest.cc
index baf7b51ec8859cf46df64ae43d187993c540fd15..f5a24faede23dfa0e381c514315c150cd8f3a319 100644
--- a/tools/json_schema_compiler/test/error_generation_unittest.cc
+++ b/tools/json_schema_compiler/test/error_generation_unittest.cc
@@ -33,8 +33,8 @@ testing::AssertionResult EqualsUtf16(const std::string& expected,
TEST(JsonSchemaCompilerErrorTest, RequiredPropertyPopulate) {
{
- scoped_ptr<DictionaryValue> value = Dictionary(
- "string", new StringValue("bling"));
+ scoped_ptr<base::DictionaryValue> value = Dictionary(
+ "string", new base::StringValue("bling"));
EXPECT_TRUE(EqualsUtf16("", GetPopulateError<TestType>(*value)));
}
{
@@ -61,7 +61,7 @@ TEST(JsonSchemaCompilerErrorTest, UnexpectedTypePopulation) {
TEST(JsonSchemaCompilerErrorTest, TypeIsRequired) {
{
- scoped_ptr<DictionaryValue> value = Dictionary(
+ scoped_ptr<base::DictionaryValue> value = Dictionary(
"integers", new FundamentalValue(5));
EXPECT_TRUE(EqualsUtf16("", GetPopulateError<ChoiceType>(*value)));
}
@@ -100,7 +100,7 @@ TEST(JsonSchemaCompilerErrorTest, ParamIsRequired) {
}
{
scoped_ptr<base::ListValue> params_value = List(
- Value::CreateNullValue());
+ base::Value::CreateNullValue());
base::string16 error;
EXPECT_FALSE(TestFunction::Params::Create(*params_value, &error));
EXPECT_TRUE(EqualsUtf16("'num' is required", error));
@@ -111,12 +111,12 @@ TEST(JsonSchemaCompilerErrorTest, ParamIsRequired) {
TEST(JsonSchemaCompilerErrorTest, WrongPropertyValueType) {
{
- scoped_ptr<DictionaryValue> value = Dictionary(
- "string", new StringValue("yes"));
+ scoped_ptr<base::DictionaryValue> value = Dictionary(
+ "string", new base::StringValue("yes"));
EXPECT_TRUE(EqualsUtf16("", GetPopulateError<TestType>(*value)));
}
{
- scoped_ptr<DictionaryValue> value = Dictionary(
+ scoped_ptr<base::DictionaryValue> value = Dictionary(
"string", new FundamentalValue(1.1));
EXPECT_TRUE(EqualsUtf16("'string': expected string, got number",
GetPopulateError<TestType>(*value)));
@@ -126,7 +126,7 @@ TEST(JsonSchemaCompilerErrorTest, WrongPropertyValueType) {
TEST(JsonSchemaCompilerErrorTest, WrongParameterCreationType) {
{
scoped_ptr<base::ListValue> params_value = List(
- new StringValue("Yeah!"));
+ new base::StringValue("Yeah!"));
EXPECT_TRUE(TestString::Params::Create(*params_value));
}
{
@@ -145,7 +145,7 @@ TEST(JsonSchemaCompilerErrorTest, WrongTypeValueType) {
EXPECT_TRUE(EqualsUtf16("", GetPopulateError<ObjectType>(*value)));
}
{
- scoped_ptr<DictionaryValue> value = Dictionary(
+ scoped_ptr<base::DictionaryValue> value = Dictionary(
"otherType", new FundamentalValue(1.1));
EXPECT_TRUE(EqualsUtf16("'otherType': expected dictionary, got number",
GetPopulateError<ObjectType>(*value)));
@@ -170,12 +170,12 @@ TEST(JsonSchemaCompilerErrorTest, UnableToPopulateArray) {
TEST(JsonSchemaCompilerErrorTest, BinaryTypeExpected) {
{
- scoped_ptr<DictionaryValue> value = Dictionary(
+ scoped_ptr<base::DictionaryValue> value = Dictionary(
"data", new base::BinaryValue());
EXPECT_TRUE(EqualsUtf16("", GetPopulateError<BinaryData>(*value)));
}
{
- scoped_ptr<DictionaryValue> value = Dictionary(
+ scoped_ptr<base::DictionaryValue> value = Dictionary(
"data", new FundamentalValue(1.1));
EXPECT_TRUE(EqualsUtf16("'data': expected binary, got number",
GetPopulateError<BinaryData>(*value)));
@@ -184,12 +184,12 @@ TEST(JsonSchemaCompilerErrorTest, BinaryTypeExpected) {
TEST(JsonSchemaCompilerErrorTest, ListExpected) {
{
- scoped_ptr<DictionaryValue> value = Dictionary(
+ scoped_ptr<base::DictionaryValue> value = Dictionary(
"TheArray", new base::ListValue());
EXPECT_TRUE(EqualsUtf16("", GetPopulateError<ArrayObject>(*value)));
}
{
- scoped_ptr<DictionaryValue> value = Dictionary(
+ scoped_ptr<base::DictionaryValue> value = Dictionary(
"TheArray", new FundamentalValue(5));
EXPECT_TRUE(EqualsUtf16("'TheArray': expected list, got integer",
GetPopulateError<ArrayObject>(*value)));
@@ -200,13 +200,13 @@ TEST(JsonSchemaCompilerErrorTest, ListExpected) {
TEST(JsonSchemaCompilerErrorTest, BadEnumValue) {
{
- scoped_ptr<DictionaryValue> value = Dictionary(
- "enumeration", new StringValue("one"));
+ scoped_ptr<base::DictionaryValue> value = Dictionary(
+ "enumeration", new base::StringValue("one"));
EXPECT_TRUE(EqualsUtf16("", GetPopulateError<HasEnumeration>(*value)));
}
{
- scoped_ptr<DictionaryValue> value = Dictionary(
- "enumeration", new StringValue("bad sauce"));
+ scoped_ptr<base::DictionaryValue> value = Dictionary(
+ "enumeration", new base::StringValue("bad sauce"));
EXPECT_TRUE(EqualsUtf16("'enumeration': expected \"one\" or \"two\" "
"or \"three\", got \"bad sauce\"",
GetPopulateError<HasEnumeration>(*value)));
« no previous file with comments | « tools/json_schema_compiler/test/enums_unittest.cc ('k') | tools/json_schema_compiler/test/functions_as_parameters_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698