| 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 6372032c13576b29f56a860d255c19c18c057edd..73809de5c860fd2b52a5b23a862fcc7e36994cfe 100644
|
| --- a/components/json_schema/json_schema_validator_unittest.cc
|
| +++ b/components/json_schema/json_schema_validator_unittest.cc
|
| @@ -83,8 +83,7 @@ TEST(JSONSchemaValidator, IsValidSchema) {
|
| "{"
|
| " \"type\": \"string\","
|
| " \"enum\": [ { \"name\": {} } ]" // "enum" name must be a simple value.
|
| - "}",
|
| - &error));
|
| + "}", &error));
|
| EXPECT_FALSE(JSONSchemaValidator::IsValidSchema(
|
| "{"
|
| " \"type\": \"array\","
|
| @@ -132,4 +131,16 @@ TEST(JSONSchemaValidator, IsValidSchema) {
|
| " \"type\": \"any\""
|
| " }"
|
| "}", &error)) << error;
|
| + EXPECT_TRUE(JSONSchemaValidator::IsValidSchema(
|
| + "{"
|
| + " \"type\": \"object\","
|
| + " \"unknown attribute\": \"that should just be ignored\""
|
| + "}",
|
| + JSONSchemaValidator::OPTIONS_IGNORE_UNKNOWN_ATTRIBUTES,
|
| + &error)) << error;
|
| + EXPECT_FALSE(JSONSchemaValidator::IsValidSchema(
|
| + "{"
|
| + " \"type\": \"object\","
|
| + " \"unknown attribute\": \"that will cause a failure\""
|
| + "}", 0, &error)) << error;
|
| }
|
|
|