- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 03 Mar 2009 22:27:43 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/autotest/client
In directory hutz:/tmp/cvs-serv17045
Modified Files:
buildtest.js
Log Message:
safari workaround...
Index: buildtest.js
===================================================================
RCS file: /sources/public/2002/css-validator/autotest/client/buildtest.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- buildtest.js 3 Mar 2009 20:13:24 -0000 1.1
+++ buildtest.js 3 Mar 2009 22:27:41 -0000 1.2
@@ -1,8 +1,8 @@
-function getTestList(e) {
+function getTestList(uri) {
var xmlhttp = new XMLHttpRequest();
// xmlhttp.open("GET", "/css-validator/autotest/testsuite/xml/"+
// "bugs.xml",false);
- xmlhttp.open("GET", e, false);
+ xmlhttp.open("GET", uri, false);
// xmlhttp.setRequestHeader('Accept','application/json')
// xmlhttp.onreadystatechange=function() {
// if (xmlhttp.readyState==4) {
@@ -89,13 +89,17 @@
function generateTestTable(req) {
var testxml = req.responseXML;
+ var docuri = testxml.documentURI;
+ if (!docuri) {
+ docuri = testxml.URL; // damn Safari...
+ }
var allTypes = testxml.getElementsByTagName("type");
// for each <type title="foo"> get the table, find test
// and add them
for (var i=0; i<allTypes.length; i++) {
var testTable = getTestTable(allTypes[i]);
var allTests = allTypes[i].getElementsByTagName("test");
- fillTableWithTests(testxml.documentURI, testTable, allTests);
+ fillTableWithTests(docuri, testTable, allTests);
}
}
Received on Tuesday, 3 March 2009 22:27:53 UTC