/external/chromium_org/chrome/renderer/resources/extensions/ |
H A D | json_schema.js | 12 // See: http://www.json.com/json-schema-proposal/ for more details. 36 // - by default an "object" typed schema does not allow additional properties. 37 // if present, "additionalProperties" is to be a schema against which all 57 * Validates an instance against a schema and accumulates errors. Usage: 60 * validator.validate(inst, schema); 97 unknownSchemaReference: "Unknown schema reference: *.", 116 * Classifies a value as one of the JSON schema primitive types. Note that we 143 * with "$ref": <typeId>. Each type must be a valid schema and define an 163 * Returns a list of strings of the types that this schema accepts. 165 JSONSchemaValidator.prototype.getAllTypesForSchema = function(schema) { [all...] |
H A D | binding.js | 85 CustomBindingsObject.prototype.setSchema = function(schema) { 86 // The functions in the schema are in list form, so we move them into a 90 $Array.forEach(schema.functions, function(f) { 147 function Binding(schema) { 148 this.schema_ = schema; 149 this.apiFunctions_ = new APIFunctions(schema.namespace); 163 // order to do the schema generation (registerCustomEvent and 173 // Registers a function |hook| to run after the schema for all APIs has been 192 schema: this.schema_, 201 var schema [all...] |
H A D | storage_area.js | 9 function extendSchema(schema) { 10 var extendedSchema = $Array.slice(schema); 15 function StorageArea(namespace, schema) {
|
H A D | content_setting.js | 10 function extendSchema(schema) { 11 var extendedSchema = $Array.slice(schema); 41 var schema = 43 validate([callback], schema); 47 extendSchema(schema));
|
H A D | declarative_content_custom_bindings.js | 15 // Returns the schema definition of type |typeId| defined in |namespace|. 17 return utils.lookup(api.schema.types, 26 // generated union dictionary against the schema for |typeId|. 34 var schema = getSchema(typeId); 35 validate([instance], [schema]);
|
/external/chromium_org/chrome/common/json_schema/ |
H A D | json_schema_validator_unittest_base.cc | 22 namespace schema = json_schema_constants; 88 scoped_ptr<base::DictionaryValue> schema( 92 ASSERT_TRUE(schema.get()); 95 ExpectValid(TEST_SOURCE, instance.get(), schema.get(), NULL); 97 ExpectValid(TEST_SOURCE, instance.get(), schema.get(), NULL); 99 ExpectNotValid(TEST_SOURCE, instance.get(), schema.get(), NULL, "1", 102 schema::kNumber, 103 schema::kObject)); 110 ExpectNotValid(TEST_SOURCE, instance.get(), schema.get(), NULL, 121 scoped_ptr<base::DictionaryValue> schema(ne [all...] |
H A D | json_schema_validator.cc | 19 namespace schema = json_schema_constants; 32 schema::kAny, 33 schema::kArray, 34 schema::kBoolean, 35 schema::kInteger, 36 schema::kNull, 37 schema::kNumber, 38 schema::kObject, 39 schema::kString, 45 // Maps a schema attribut 334 IsValidSchema( const std::string& schema, std::string* error) argument 353 JSONSchemaValidator(base::DictionaryValue* schema) argument 357 JSONSchemaValidator(base::DictionaryValue* schema, base::ListValue* types) argument 383 Validate(const base::Value* instance, const base::DictionaryValue* schema, const std::string& path) argument 436 schema, local 440 schema, path); local 507 ValidateObject(const base::DictionaryValue* instance, const base::DictionaryValue* schema, const std::string& path) argument 553 ValidateArray(const base::ListValue* instance, const base::DictionaryValue* schema, const std::string& path) argument 595 ValidateTuple(const base::ListValue* instance, const base::DictionaryValue* schema, const std::string& path) argument 643 ValidateString(const base::Value* instance, const base::DictionaryValue* schema, const std::string& path) argument 670 ValidateNumber(const base::Value* instance, const base::DictionaryValue* schema, const std::string& path) argument 711 SchemaAllowsAnyAdditionalItems( const base::DictionaryValue* schema, const base::DictionaryValue** additional_properties_schema) argument [all...] |
H A D | json_schema_validator.h | 24 // See: http://www.json.com/json-schema-proposal/ for more details. 52 // - by default an "object" typed schema does not allow additional properties. 53 // if present, "additionalProperties" is to be a schema against which all 90 // Classifies a Value as one of the JSON schema primitive types. 102 // Verifies if |schema| is a valid JSON v3 schema. When this validation passes 103 // then |schema| is valid JSON that can be parsed into a DictionaryValue, 105 // Returns the parsed DictionaryValue when |schema| validated, otherwise 108 const std::string& schema, 111 // Creates a validator for the specified schema [all...] |
/external/chromium_org/tools/json_schema_compiler/ |
H A D | idl_schema_test.py | 9 def getFunction(schema, name): 10 for item in schema['functions']: 15 def getParams(schema, name): 16 function = getFunction(schema, name) 19 def getType(schema, id): 20 for item in schema['types']: 32 schema = self.idl_basics 34 self.assertEquals(expected, getParams(schema, 'function4')) 38 self.assertEquals(expected, getParams(schema, 'function5')) 42 self.assertEquals(expected, getParams(schema, 'function [all...] |
H A D | json_schema_test.py | 79 schema = json_schema.CachedLoad('test/json_schema_test.json') 80 self.assertEquals(compiled, json_schema.DeleteNodes(schema, 'nocompile'))
|
H A D | schema_loader.py | 39 def LoadSchema(self, schema): 40 schema_filename, schema_extension = os.path.splitext(schema) 43 api_defs = json_schema.Load(schema) 45 api_defs = idl_schema.Load(schema) 47 sys.exit('Did not recognize file extension %s for schema %s' % 48 (schema_extension, schema)) 51 'a single schema.' % schema)
|
/external/chromium/chrome/common/ |
H A D | json_schema_validator_unittest_base.cc | 85 scoped_ptr<DictionaryValue> schema(LoadDictionary("complex_schema.json")); 88 ASSERT_TRUE(schema.get()); 91 ExpectValid(TEST_SOURCE, instance.get(), schema.get(), NULL); 93 ExpectValid(TEST_SOURCE, instance.get(), schema.get(), NULL); 95 ExpectNotValid(TEST_SOURCE, instance.get(), schema.get(), NULL, "1", 104 ExpectNotValid(TEST_SOURCE, instance.get(), schema.get(), NULL, 115 scoped_ptr<DictionaryValue> schema(new DictionaryValue()); 116 schema->SetString("type", "string"); 117 schema->SetString("pattern", "foo+"); 121 schema [all...] |
H A D | json_schema_validator.h | 22 // See: http://www.json.com/json-schema-proposal/ for more details. 50 // - by default an "object" typed schema does not allow additional properties. 51 // if present, "additionalProperties" is to be a schema against which all 87 // Classifies a Value as one of the JSON schema primitive types. 99 // Creates a validator for the specified schema. 101 // NOTE: This constructor assumes that |schema| is well formed and valid. 104 explicit JSONSchemaValidator(DictionaryValue* schema); 106 // Creates a validator for the specified schema and user-defined types. Each 108 // field. Schema objects in |schema| can refer to these types with the "$ref" 111 // NOTE: This constructor assumes that |schema| an [all...] |
H A D | json_schema_validator_unittest.cc | 18 Value* instance, DictionaryValue* schema, 20 JSONSchemaValidator validator(schema, types); 32 Value* instance, DictionaryValue* schema, 36 JSONSchemaValidator validator(schema, types); 17 ExpectValid(const std::string& test_source, Value* instance, DictionaryValue* schema, ListValue* types) argument 31 ExpectNotValid(const std::string& test_source, Value* instance, DictionaryValue* schema, ListValue* types, const std::string& expected_error_path, const std::string& expected_error_message) argument
|
/external/chromium_org/chrome/common/policy/ |
H A D | policy_schema_unittest.cc | 13 #define SCHEMA_VERSION "\"$schema\":\"http://json-schema.org/draft-03/schema#\"" 18 scoped_ptr<PolicySchema> schema = PolicySchema::Parse(content, &error); local 19 EXPECT_TRUE(schema || !error.empty()); 20 return !schema; 82 scoped_ptr<PolicySchema> schema = PolicySchema::Parse( local 123 ASSERT_TRUE(schema) << error; 125 ASSERT_EQ(base::Value::TYPE_DICTIONARY, schema->type()); 126 EXPECT_FALSE(schema [all...] |
/external/chromium_org/tools/json_to_struct/ |
H A D | json_to_struct.py | 6 # Format for the JSON schema file: 12 # "schema": [ // Fields of the generated structure. 83 def _GenerateH(basepath, fileroot, head, namespace, schema, description): 85 by the schema. 93 schema: A dict containing the schema. See comment at the top of this file. 110 for header in schema.get('headers', []): 119 schema['type_name'], schema['schema'])) 206 schema = _Load(opts.schema) variable [all...] |
H A D | struct_generator.py | 34 def GenerateStruct(type_name, schema): 36 the schema list. 40 for field_info in schema:
|
H A D | struct_generator_test.py | 37 schema = [ 55 self.assertEquals(struct, GenerateStruct('MyTypeName', schema))
|
/external/chromium_org/chrome/browser/policy/ |
H A D | policy_domain_descriptor.cc | 18 bool Matches(const PolicySchema* schema, const base::Value& value) { argument 19 if (!schema) { 24 if (!value.IsType(schema->type())) 32 if (!Matches(schema->GetSchemaForProperty(it.key()), it.value())) 38 if (!*it || !Matches(schema->GetSchemaForItems(), **it)) 53 scoped_ptr<PolicySchema> schema) { 56 entry = schema.release(); 76 // TODO(joaodasilva): if a component is registered but doesn't have a schema 51 RegisterComponent( const std::string& component_id, scoped_ptr<PolicySchema> schema) argument
|
H A D | registry_dict_win.cc | 17 namespace schema = json_schema_constants; 36 // Returns the Value type described in |schema|, or |default_type| if not found. 37 base::Value::Type GetValueTypeForSchema(const base::DictionaryValue* schema, argument 39 // JSON-schema types to base::Value::Type mapping. 41 // JSON schema type. 46 { schema::kArray, base::Value::TYPE_LIST }, 47 { schema::kBoolean, base::Value::TYPE_BOOLEAN }, 48 { schema::kInteger, base::Value::TYPE_INTEGER }, 49 { schema::kNull, base::Value::TYPE_NULL }, 50 { schema 70 GetSchemaFor(const base::DictionaryValue* schema, const std::string& name) argument 84 ConvertValue(const base::Value& value, const base::DictionaryValue* schema) argument [all...] |
/external/chromium_org/third_party/libxml/src/ |
H A D | check-relaxng-test-suite.py | 70 def handle_valid(node, schema): 95 ctxt = schema.relaxNGNewValidCtxt() 111 def handle_invalid(node, schema): 135 ctxt = schema.relaxNGNewValidCtxt() 156 schema = "" 160 schema = schema + child.serialize() 164 rngp = libxml2.relaxNGNewMemParserCtxt(schema, len(schema)) 169 log.write("\nFailed to compile correct schema [all...] |
H A D | check-relaxng-test-suite2.py | 57 def handle_valid(node, schema): 88 ctxt = schema.relaxNGNewValidCtxt() 110 def handle_invalid(node, schema): 141 ctxt = schema.relaxNGNewValidCtxt() 170 schema = "" 174 schema = schema + child.serialize() 178 rngp = libxml2.relaxNGNewMemParserCtxt(schema, len(schema)) 183 log.write("\nFailed to compile correct schema [all...] |
H A D | check-xsddata-test-suite.py | 56 def handle_valid(node, schema): 87 ctxt = schema.relaxNGNewValidCtxt() 109 def handle_invalid(node, schema): 140 ctxt = schema.relaxNGNewValidCtxt() 168 schema = "" 172 schema = schema + child.serialize() 176 rngp = libxml2.relaxNGNewMemParserCtxt(schema, len(schema)) 181 log.write("\nFailed to compile correct schema [all...] |
/external/xmp_toolkit/XMPCore/src/com/adobe/xmp/impl/ |
H A D | Utils.java | 154 * @param schema 155 * a schema namespace 161 static boolean isInternalProperty(String schema, String prop) argument 165 if (NS_DC.equals(schema)) 172 else if (NS_XMP.equals(schema)) 181 else if (NS_PDF.equals(schema)) 190 else if (NS_TIFF.equals(schema)) 199 else if (NS_EXIF.equals(schema)) 207 else if (NS_EXIF_AUX.equals(schema)) 211 else if (NS_PHOTOSHOP.equals(schema)) [all...] |
/external/chromium_org/chrome/common/extensions/api/storage/ |
H A D | storage_schema_manifest_handler_unittest.cc | 38 scoped_refptr<Extension> CreateExtension(const std::string& schema) { argument 45 base::FilePath schema_path = temp_dir_.path().AppendASCII("schema.json"); 46 if (schema.empty()) { 49 if (file_util::WriteFile(schema_path, schema.data(), schema.size()) != 50 static_cast<int>(schema.size())) { 57 testing::AssertionResult Validates(const std::string& schema) { argument 58 scoped_refptr<Extension> extension = CreateExtension(schema); 84 manifest_.SetString("storage.managed_schema", "schema.json"); 107 manifest_.SetString("storage.managed_schema", "schema [all...] |