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..ad752e40a01296dfbc84716af7e84ac0b472a7c7 100644 |
--- a/components/json_schema/json_schema_validator_unittest.cc |
+++ b/components/json_schema/json_schema_validator_unittest.cc |
@@ -134,6 +134,19 @@ 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_TRUE(JSONSchemaValidator::IsValidSchema( |
+ "{" |
+ " \"type\": \"object\"," |
" \"unknown attribute\": \"that should just be ignored\"" |
"}", |
JSONSchemaValidator::OPTIONS_IGNORE_UNKNOWN_ATTRIBUTES, |