Make schema validation tests not hardcode my path. Patch be sspeiche, r=me

git-svn-id: svn://10.0.0.236/trunk@216485 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
doronr%us.ibm.com 2006-12-05 16:21:13 +00:00
parent a71ebd6df4
commit 2de3ed3b02
2 changed files with 6 additions and 5 deletions

View File

@ -32,7 +32,7 @@
if (!gXMLDoc) {
var xmlHTTP = new XMLHttpRequest();
xmlHTTP.open("GET", "file:///home/doron/mozbuilds/trunk/mozilla/extensions/schema-validation/tests/schema-complex-test.xml", false);
xmlHTTP.open("GET", document.URL + "/../schema-complex-test.xml", false);
xmlHTTP.send(null);
gXMLDoc = xmlHTTP.responseXML;
}
@ -135,7 +135,8 @@
var schemaLoader = Components.classes["@mozilla.org/xmlextras/schemas/schemaloader;1"]
.getService(Components.interfaces.nsISchemaLoader);
try {
schema = schemaLoader.load("file:///home/doron/mozbuilds/trunk/mozilla/extensions/schema-validation/tests/schema.xsd");
// SchemaLoader.Load() wants a URI
schema = schemaLoader.load(document.URL + "/../schema.xsd");
//alert(schema.attributeFormDefaultQualified)
myValidator.loadSchema(schema);
} catch(e){alert(e)}

View File

@ -130,8 +130,9 @@
var schemaLoader = Components.classes["@mozilla.org/xmlextras/schemas/schemaloader;1"]
.getService(Components.interfaces.nsISchemaLoader);
try {
schema = schemaLoader.load("file:///home/doron/mozbuilds/trunk/mozilla/extensions/schema-validation/tests/schema.xsd");
try {
// SchemaLoader.Load() wants a URI
schema = schemaLoader.load(document.URL + "/../schema.xsd");
myValidator.loadSchema(schema);
} catch(e){alert(e)}
@ -700,7 +701,6 @@
validateStringNS("220", "include-integer-test-3", "http://www.mozilla.org/schema/test_imported", false);
validateStringNS("6", "include-integer-test-3", "http://www.mozilla.org/schema/test_imported", true);
}
end = new Date();