/external/chromium_org/tools/json_schema_compiler/ |
H A D | idl_schema_test.py | 11 def getFunction(schema, name): 12 for item in schema['functions']: 18 def getParams(schema, name): 19 function = getFunction(schema, name) 23 def getReturns(schema, name): 24 function = getFunction(schema, name) 28 def getType(schema, id): 29 for item in schema['types']: 43 schema = self.idl_basics 45 self.assertEquals(expected, getParams(schema, 'function [all...] |
H A D | features_compiler.py | 24 schema = os.path.normpath(filename) 25 schema_loader = SchemaLoader(os.path.dirname(os.path.relpath(schema, root)), 26 os.path.dirname(schema)) 27 schema_filename = os.path.splitext(schema)[0] 28 feature_defs = schema_loader.LoadSchema(schema) 35 source_file_dir, _ = os.path.split(schema) 37 full_path = os.path.join(relpath, schema) 58 description='Generates a C++ features model from JSON schema', 59 usage='usage: %prog [option]... schema') 61 help='logical include root directory. Path to schema file [all...] |
H A D | json_schema_test.py | 78 schema = json_schema.CachedLoad('test/json_schema_test.json') 79 self.assertEquals(compiled, json_schema.DeleteNodes(schema, 'nocompile'))
|
/external/chromium_org/extensions/renderer/resources/ |
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 64 * Validates an instance against a schema and accumulates errors. Usage: 67 * validator.validate(inst, schema); 104 unknownSchemaReference: "Unknown schema reference: *.", 123 * Classifies a value as one of the JSON schema primitive types. Note that we 150 * with "$ref": <typeId>. Each type must be a valid schema and define an 170 * Returns a list of strings of the types that this schema accepts. 172 JSONSchemaValidator.prototype.getAllTypesForSchema = function(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 | binding.js | 106 CustomBindingsObject.prototype.setSchema = function(schema) { 107 // The functions in the schema are in list form, so we move them into a 111 $Array.forEach(schema.functions, function(f) { 168 function Binding(schema) { 169 this.schema_ = schema; 170 this.apiFunctions_ = new APIFunctions(schema.namespace); 184 // order to do the schema generation (registerCustomEvent and 194 // Registers a function |hook| to run after the schema for all APIs has been 213 schema: this.schema_, 222 var schema [all...] |
/external/chromium_org/components/json_schema/ |
H A D | json_schema_validator_unittest_base.cc | 22 namespace schema = json_schema_constants; 90 scoped_ptr<base::DictionaryValue> schema( 94 ASSERT_TRUE(schema.get()); 97 ExpectValid(TEST_SOURCE, instance.get(), schema.get(), NULL); 99 ExpectValid(TEST_SOURCE, instance.get(), schema.get(), NULL); 101 ExpectNotValid(TEST_SOURCE, instance.get(), schema.get(), NULL, "1", 104 schema::kNumber, 105 schema::kObject)); 112 ExpectNotValid(TEST_SOURCE, instance.get(), schema.get(), NULL, 119 scoped_ptr<base::DictionaryValue> schema(ne [all...] |
H A D | json_schema_validator.cc | 22 namespace schema = json_schema_constants; 35 schema::kAny, 36 schema::kArray, 37 schema::kBoolean, 38 schema::kInteger, 39 schema::kNull, 40 schema::kNumber, 41 schema::kObject, 42 schema::kString, 48 // Maps a schema attribut 390 IsValidSchema( const std::string& schema, std::string* error) argument 397 IsValidSchema( const std::string& schema, int validator_options, std::string* error) argument 417 JSONSchemaValidator(base::DictionaryValue* schema) argument 421 JSONSchemaValidator(base::DictionaryValue* schema, base::ListValue* types) argument 447 Validate(const base::Value* instance, const base::DictionaryValue* schema, const std::string& path) argument 500 schema, local 504 schema, path); local 577 ValidateObject(const base::DictionaryValue* instance, const base::DictionaryValue* schema, const std::string& path) argument 658 ValidateArray(const base::ListValue* instance, const base::DictionaryValue* schema, const std::string& path) argument 700 ValidateTuple(const base::ListValue* instance, const base::DictionaryValue* schema, const std::string& path) argument 748 ValidateString(const base::Value* instance, const base::DictionaryValue* schema, const std::string& path) argument 788 ValidateNumber(const base::Value* instance, const base::DictionaryValue* schema, const std::string& path) argument 829 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. 51 // - by default an "object" typed schema does not allow additional properties. 52 // if present, "additionalProperties" is to be a schema against which all 76 // attributes will make the schema validation fail. 98 // Classifies a Value as one of the JSON schema primitive types. 110 // Verifies if |schema| is a valid JSON v3 schema. When this validation passes 111 // then |schema| is valid JSON that can be parsed into a DictionaryValue, 113 // Returns the parsed DictionaryValue when |schema| validated, otherwise 120 const std::string& schema, [all...] |
/external/chromium_org/extensions/test/data/ |
H A D | json_schema_test.js | 9 function assertValid(type, instance, schema, types) { 13 validator["validate" + type](instance, schema, ""); 25 function assertNotValid(type, instance, schema, errors, types) { 29 validator["validate" + type](instance, schema, ""); 75 var schema = { 117 assertValid("", instance, schema); 119 assertValid("", instance, schema); 122 assertNotValid("", instance, schema, 127 assertNotValid("", instance, schema, 129 [schema [all...] |
/external/chromium_org/chrome/browser/extensions/ |
H A D | extension_management_test_util.cc | 11 namespace schema = schema_constants; 43 pref_->SetString(make_path(schema::kWildcard, schema::kInstallationMode), 44 value ? schema::kBlocked : schema::kAllowed); 52 if (it.key() != schema::kWildcard) { 54 pref_->Remove(make_path(it.key(), schema::kInstallationMode), NULL); 55 pref_->Remove(make_path(it.key(), schema::kUpdateUrl), NULL); 65 pref_->SetString(make_path(id, schema::kInstallationMode), 66 allowed ? schema [all...] |
/external/chromium_org/components/policy/core/common/ |
H A D | schema_unittest.cc | 5 #include "components/policy/core/common/schema.h" 133 Schema schema = Schema::Parse(content, &error); local 134 if (schema.valid()) 141 Schema schema, 150 bool returned = schema.Validate(value, strategy, NULL, &error); 159 schema.Normalize(cloned_value.get(), strategy, NULL, &error, &touched); 162 bool strictly_valid = schema.Validate(value, SCHEMA_STRICT, NULL, &error); 169 schema.Validate(*cloned_value.get(), SCHEMA_STRICT, NULL, &error)) 172 schema.Normalize(cloned_value.get(), SCHEMA_STRICT, NULL, &error, NULL)) 177 void TestSchemaValidationWithPath(Schema schema, argument 140 TestSchemaValidationHelper(const std::string& source, Schema schema, const base::Value& value, SchemaOnErrorStrategy strategy, bool expected_return_value) argument 257 Schema schema = Schema::Parse( local 294 Schema schema = Schema::Parse(kTestSchema, &error); local 426 Schema schema = Schema::Parse("{ \\"type\\": \\"object\\" }", &error); local 542 Schema schema = Schema::Wrap(&kData); local 601 Schema schema = Schema::Parse(kTestSchema, &error); local 978 Schema schema = Schema::Parse( local 1028 Schema schema = Schema::Parse( local 1059 Schema schema = Schema::Parse( local 1098 Schema schema = Schema::Parse( local [all...] |
H A D | schema.cc | 5 #include "components/policy/core/common/schema.h" 23 namespace schema = json_schema_constants; 35 // Maps schema "id" attributes to the corresponding SchemaNode index. 71 { schema::kArray, base::Value::TYPE_LIST }, 72 { schema::kBoolean, base::Value::TYPE_BOOLEAN }, 73 { schema::kInteger, base::Value::TYPE_INTEGER }, 74 { schema::kNull, base::Value::TYPE_NULL }, 75 { schema::kNumber, base::Value::TYPE_DOUBLE }, 76 { schema::kObject, base::Value::TYPE_DICTIONARY }, 77 { schema 156 const SchemaNode* schema(int index) const { function in class:policy::Schema::InternalStorage 285 ParseSchema(const base::DictionaryValue& schema, std::string* error) argument 355 DetermineStorageSizes( const base::DictionaryValue& schema, StorageSizes* sizes) argument 430 Parse(const base::DictionaryValue& schema, int* index, IdMap* id_map, ReferenceList* reference_list, std::string* error) argument 497 ParseDictionary( const base::DictionaryValue& schema, SchemaNode* schema_node, IdMap* id_map, ReferenceList* reference_list, std::string* error) argument 585 ParseList(const base::DictionaryValue& schema, SchemaNode* schema_node, IdMap* id_map, ReferenceList* reference_list, std::string* error) argument 598 ParseEnum(const base::DictionaryValue& schema, base::Value::Type type, SchemaNode* schema_node, std::string* error) argument 649 ParseRangedInt( const base::DictionaryValue& schema, SchemaNode* schema_node, std::string* error) argument 671 ParseStringPattern( const base::DictionaryValue& schema, SchemaNode* schema_node, std::string* error) argument 745 Schema Schema::Iterator::schema() const { function in class:policy::Schema::Iterator 755 Schema(const Schema& schema) argument 760 operator =(const Schema& schema) argument 1040 Schema schema = GetKnownProperty(key); local [all...] |
H A D | generate_policy_source_unittest.cc | 12 #include "components/policy/core/common/schema.h" 44 if (!IsSameSchema(a_it.schema(), b_it.schema())) 58 Schema schema = Schema::Wrap(GetChromeSchemaData()); local 59 ASSERT_TRUE(schema.valid()); 60 EXPECT_EQ(base::Value::TYPE_DICTIONARY, schema.type()); 62 Schema subschema = schema.GetAdditionalProperties(); 65 subschema = schema.GetProperty("no such policy exists"); 68 subschema = schema.GetProperty(key::kSearchSuggestEnabled); 72 subschema = 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/renderer/resources/extensions/ |
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));
|
/external/chromium_org/chrome/common/extensions/docs/server2/ |
H A D | schema_processor.py | 13 '''Fake SchemaProcessor class. Returns the original schema, without 31 '''Factory for creating the schema processing utility. 55 '''Helper for parsing the API schema. 73 '''Removes nodes that should not be rendered from an API schema. 91 def _DetectInlineableTypes(self, schema): 95 if not schema.get('types'): 101 stack = [schema] 112 for type_ in schema['types']: 118 def _InlineDocs(self, schema): 121 from the schema [all...] |
H A D | schema_processor_test.py | 136 schema = { 204 inlined_schema = deepcopy(schema) 209 schema = { 244 schema_processor._DetectInlineableTypes(schema) 245 schema_processor._InlineDocs(schema) 246 self.assertEqual(expected_schema, schema)
|
/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 (base::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); 83 manifest_.SetString("storage.managed_schema", "schema.json"); 107 manifest_.SetString("storage.managed_schema", "schema [all...] |