2002/css-validator/autotest/client checktests.js,1.1,1.2

Update of /sources/public/2002/css-validator/autotest/client
In directory hutz:/tmp/cvs-serv6177

Modified Files:
	checktests.js 
Log Message:
added reset


Index: checktests.js
===================================================================
RCS file: /sources/public/2002/css-validator/autotest/client/checktests.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- checktests.js	3 Mar 2009 20:13:24 -0000	1.1
+++ checktests.js	3 Mar 2009 21:36:54 -0000	1.2
@@ -73,3 +73,26 @@
 	}
     }
 }
+
+function resetresults(tableid) {
+    var testTable = document.getElementById(tableid);
+    if (testTable) {
+	var allTests = testTable.getElementsByTagName('tr')
+	for (var i=0; i< allTests.length; i++) {
+	    var cname = allTests[i].className;
+	    if (cname == "expected") {
+		var allTds = allTests[i].getElementsByTagName("td");
+		if (allTds[0].hasAttribute("class")) {
+		    allTds[0].removeAttribute("class");
+		}
+	    } else {
+		var allTds = allTests[i].getElementsByTagName("td")
+		for (var j=0; j< allTest.length; j++) {
+		    if (allTds[i].hasAttribute("class")) {
+			allTds[i].removeAttribute("class");
+		    }
+		}
+	    }
+	}
+    }
+}
\ No newline at end of file

Received on Tuesday, 3 March 2009 21:37:06 UTC