W3C home > Mailing lists > Public > www-validator-cvs@w3.org > November 2011

2002/css-validator/autotest/client buildtest.js,1.8,1.9 checktests.js,1.6,1.7

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 09 Nov 2011 12:56:31 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1RO7hf-0000Ph-Ly@lionel-hutz.w3.org>
Update of /sources/public/2002/css-validator/autotest/client
In directory hutz:/tmp/cvs-serv1560

Modified Files:
	buildtest.js checktests.js 
Log Message:
using medium & warning level

Index: buildtest.js
===================================================================
RCS file: /sources/public/2002/css-validator/autotest/client/buildtest.js,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- buildtest.js	9 Nov 2011 10:53:37 -0000	1.8
+++ buildtest.js	9 Nov 2011 12:56:29 -0000	1.9
@@ -203,6 +203,8 @@
 	cell.setAttribute("rowspan","2");
 	var anc =  document.createElement("a");
 	anc.setAttribute("href",testfile);
+        anc.setAttribute("medium", medium);
+	anc.setAttribute("warning", warningLevel);
 	var text = document.createTextNode("[Testcase]");
 	anc.appendChild(text);
 	cell.appendChild(anc);

Index: checktests.js
===================================================================
RCS file: /sources/public/2002/css-validator/autotest/client/checktests.js,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- checktests.js	4 Mar 2009 11:04:49 -0000	1.6
+++ checktests.js	9 Nov 2011 12:56:29 -0000	1.7
@@ -37,12 +37,12 @@
     allTestTds[0].setAttribute("class", (gotRegression ? "invalid" : "valid"));
 }
 
-function checkURI(testrow, resultrow, encodedURI, cssprofile) {
+function checkURI(testrow, resultrow, encodedURI, context) {
     var xmlhttp = new XMLHttpRequest();
     xmlhttp.open("GET", "/css-validator/validator?uri="+
 		 encodedURI+
-		 "&profile="+cssprofile+
-		 "&usermedium=all&output=json&warning=1",true);
+		 "&profile="+context.cssprofile+
+		 "&usermedium="+context.medium+"&output=json&warning="+context.warninglevel,true);
     xmlhttp.setRequestHeader('Accept','application/json')
     xmlhttp.onreadystatechange=function() {
 	if (xmlhttp.readyState==4) {
@@ -57,8 +57,17 @@
     var allTds = testrow.getElementsByTagName("td");
     var anchor = allTds[0].getElementsByTagName("a");
     var uri    = urlencode(anchor[0].getAttribute("href"));
-    var cssprofile = allTds[1].firstChild.data;
-    checkURI(testrow, resultrow, uri, cssprofile)
+    var context = { 'cssprofile': "css21",
+        'warninglevel': "1",
+	'medium' : "all" };
+    context.cssprofile = allTds[1].firstChild.data;
+    if (anchor[0].hasAttribute("warning")) {
+	context.warninglevel = anchor[0].getAttribute("warning");
+    }
+    if (anchor[0].hasAttribute("medium")) {
+	context.medium = anchor[0].getAttribute("medium");
+    }
+    checkURI(testrow, resultrow, uri, context)
 }
 
 function checkTableTests(tableid) {
Received on Wednesday, 9 November 2011 12:56:40 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:47 UTC