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

Unified Diff: components/policy/core/common/schema_unittest.cc

Issue 94043003: Ignore unknown attributes when parsing JSON schemas. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added Options enum 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
« no previous file with comments | « components/policy/core/common/schema.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/core/common/schema_unittest.cc
diff --git a/components/policy/core/common/schema_unittest.cc b/components/policy/core/common/schema_unittest.cc
index e0c1603e2c6ecc50c671af0a35d5bc93bbdd8970..8fe58cf29bfbf889f7b77ac72f3cfc9eec9af249 100644
--- a/components/policy/core/common/schema_unittest.cc
+++ b/components/policy/core/common/schema_unittest.cc
@@ -111,6 +111,12 @@ TEST(SchemaTest, InvalidSchemas) {
" \"type\": \"object\","
" \"properties\": { \"Policy\": 123 }"
"}"));
+
+ EXPECT_FALSE(ParseFails(
+ "{"
+ " \"type\": \"object\","
+ " \"unknown attribute\": \"is ignored\""
+ "}"));
}
TEST(SchemaTest, Ownership) {
« no previous file with comments | « components/policy/core/common/schema.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698