Lines Matching refs:schema
13 #include "components/policy/core/common/schema.h"
47 Schema CreateTestSchema() {
49 Schema schema = Schema::Parse(kTestSchema, &error);
50 if (!schema.valid())
52 return schema;
56 Schema schema = CreateTestSchema();
58 component_map["extension-1"] = schema;
59 component_map["extension-2"] = schema;
60 component_map["legacy-extension"] = Schema();
82 // The Chrome schema does not count as a component.
83 Schema schema = CreateTestSchema();
85 component_map[""] = schema;
91 // An extension schema does.
113 const Schema* schema =
115 ASSERT_TRUE(schema);
116 EXPECT_TRUE(schema->valid());
118 schema = map->GetSchema(
120 ASSERT_TRUE(schema);
121 EXPECT_FALSE(schema->valid());
126 Schema schema = Schema::Parse(kTestSchema, &error);
127 ASSERT_TRUE(schema.valid()) << error;
130 domain_map[POLICY_DOMAIN_EXTENSIONS]["abc"] = schema;
218 Schema schema = Schema::Parse(
225 ASSERT_TRUE(schema.valid()) << error;
228 domain_map[POLICY_DOMAIN_EXTENSIONS]["with-schema"] = schema;
229 domain_map[POLICY_DOMAIN_EXTENSIONS]["without-schema"] = Schema();
236 PolicyNamespace extension_ns(POLICY_DOMAIN_EXTENSIONS, "with-schema");
254 // Known components without a schema are filtered out completely.
255 PolicyNamespace without_schema_ns(POLICY_DOMAIN_EXTENSIONS, "without-schema");
262 // Unknown policies of known components with a schema are removed.
283 map[POLICY_DOMAIN_CHROME][""] = Schema();
285 map[POLICY_DOMAIN_CHROME][""] = Schema();
294 map[POLICY_DOMAIN_CHROME][""] = Schema();
295 map[POLICY_DOMAIN_EXTENSIONS]["xyz"] = Schema();
303 map[POLICY_DOMAIN_EXTENSIONS]["abc"] = Schema();