Index: ecmascript/DOMTestCase.js =================================================================== RCS file: /sources/public/2001/DOM-Test-Suite/ecmascript/DOMTestCase.js,v retrieving revision 1.25 diff -u -r1.25 DOMTestCase.js --- ecmascript/DOMTestCase.js 25 Jun 2003 05:12:14 -0000 1.25 +++ ecmascript/DOMTestCase.js 26 Jun 2003 04:04:07 -0000 @@ -188,10 +188,14 @@ function IFrameBuilder() { this.contentType = "text/html"; - this.supportedContentTypes = [ "text/html" ]; + this.supportedContentTypes = [ "text/html", + "text/xml", + "image/svg+xml", + "application/xhtml+xml", + "text/mathml" ]; this.supportsAsyncChange = false; - this.async = false; + this.async = true; this.fixedAttributeNames = [ "validating", "expandEntityReferences", "coalescing", "signed", "hasNullString", "ignoringElementContentWhitespace", "namespaceAware" ]; @@ -212,14 +216,33 @@ IFrameBuilder.prototype.preload = function(frame, varname, url) { - if (url == "staff" && this.contentType == "text/html") { - throw "Tests using staff document are not supported by HTML processors"; + if (this.contentType == "text/html") { + if (url == "staff" || url == "nodtdstaff") { + throw "Tests using staff or nodtdstaff are not supported by HTML processors"; + } + return 1; } - return 1; + var iframe = document.createElement("iframe"); + var srcname = url + getSuffix(this.contentType); + iframe.setAttribute("name", srcname); + iframe.setAttribute("src", fileBase + srcname); + iframe.addEventListener("load", loadComplete, false); + document.getElementsByTagName("body").item(0).appendChild(iframe); + return 0; } IFrameBuilder.prototype.load = function(frame, varname, url) { - return frame.document; + if (this.contentType == "text/html") { + return frame.document; + } + var name = url + getSuffix(this.contentType); + var iframes = document.getElementsByTagName("iframe"); + for(var i = 0; i < iframes.length; i++) { + if (iframes.item(i).getAttribute("name") == name) { + return iframes.item(i).contentDocument; + } + } + return null; } IFrameBuilder.prototype.getImplementationAttribute = function(attr) { Index: transforms/test-to-jsunit.xsl =================================================================== RCS file: /sources/public/2001/DOM-Test-Suite/transforms/test-to-jsunit.xsl,v retrieving revision 1.14 diff -u -r1.14 test-to-jsunit.xsl --- transforms/test-to-jsunit.xsl 25 Jun 2003 22:56:35 -0000 1.14 +++ transforms/test-to-jsunit.xsl 26 Jun 2003 04:04:27 -0000 @@ -267,10 +267,10 @@ - + - - + +
Content Type
XML
XML
HTML
XHTML
SVG
XHTML
SVG