| 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 73809de5c860fd2b52a5b23a862fcc7e36994cfe..95f396b9df2640736ef26e2276cf16409e9516f3 100644
|
| --- a/components/json_schema/json_schema_validator_unittest.cc
|
| +++ b/components/json_schema/json_schema_validator_unittest.cc
|
| @@ -134,6 +134,26 @@ TEST(JSONSchemaValidator, IsValidSchema) {
|
| EXPECT_TRUE(JSONSchemaValidator::IsValidSchema(
|
| "{"
|
| " \"type\": \"object\","
|
| + " \"patternProperties\": {"
|
| + " \".\": { \"type\": \"any\" },"
|
| + " \"foo\": { \"type\": \"any\" },"
|
| + " \"^foo$\": { \"type\": \"any\" },"
|
| + " \"foo+\": { \"type\": \"any\" },"
|
| + " \"foo?\": { \"type\": \"any\" },"
|
| + " \"fo{2,4}\": { \"type\": \"any\" },"
|
| + " \"(left)|(right)\": { \"type\": \"any\" }"
|
| + " }"
|
| + "}", &error)) << error;
|
| + EXPECT_FALSE(JSONSchemaValidator::IsValidSchema(
|
| + "{"
|
| + " \"type\": \"object\","
|
| + " \"patternProperties\": {"
|
| + " \"(left\": { \"type\": \"any\" }"
|
| + " }"
|
| + "}", &error)) << error;
|
| + EXPECT_TRUE(JSONSchemaValidator::IsValidSchema(
|
| + "{"
|
| + " \"type\": \"object\","
|
| " \"unknown attribute\": \"that should just be ignored\""
|
| "}",
|
| JSONSchemaValidator::OPTIONS_IGNORE_UNKNOWN_ATTRIBUTES,
|
|
|