| Index: components/json_schema/json_schema_validator_unittest.cc
|
| diff --git a/components/json_schema/json_schema_validator_unittest.cc b/components/json_schema/json_schema_validator_unittest.cc
|
| index 4844ed1a8887713b85fddc0e9c3ce5633a968e86..6372032c13576b29f56a860d255c19c18c057edd 100644
|
| --- a/components/json_schema/json_schema_validator_unittest.cc
|
| +++ b/components/json_schema/json_schema_validator_unittest.cc
|
| @@ -77,10 +77,16 @@ TEST(JSONSchemaValidator, IsValidSchema) {
|
| EXPECT_FALSE(JSONSchemaValidator::IsValidSchema(
|
| "{"
|
| " \"type\": \"string\","
|
| - " \"enum\": [ {} ]," // "enum" must contain simple values.
|
| + " \"enum\": [ {} ]" // "enum" dict values must contain "name".
|
| "}", &error));
|
| EXPECT_FALSE(JSONSchemaValidator::IsValidSchema(
|
| "{"
|
| + " \"type\": \"string\","
|
| + " \"enum\": [ { \"name\": {} } ]" // "enum" name must be a simple value.
|
| + "}",
|
| + &error));
|
| + EXPECT_FALSE(JSONSchemaValidator::IsValidSchema(
|
| + "{"
|
| " \"type\": \"array\","
|
| " \"items\": [ 123 ]," // "items" must contain a schema or schemas.
|
| "}", &error));
|
| @@ -106,7 +112,7 @@ TEST(JSONSchemaValidator, IsValidSchema) {
|
| " },"
|
| " \"enum-property\": {"
|
| " \"type\": \"integer\","
|
| - " \"enum\": [0, 1, 10, 100]"
|
| + " \"enum\": [0, 1, {\"name\": 10}, 100]"
|
| " },"
|
| " \"items-property\": {"
|
| " \"type\": \"array\","
|
|
|