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

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

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 09 Nov 2011 10:53:39 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1RO5ml-00064U-Jz@lionel-hutz.w3.org>
Update of /sources/public/2002/css-validator/autotest/client
In directory hutz:/tmp/cvs-serv23324

Modified Files:
	buildtest.js 
Log Message:
added media and warninglevel check


Index: buildtest.js
===================================================================
RCS file: /sources/public/2002/css-validator/autotest/client/buildtest.js,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- buildtest.js	6 Mar 2009 20:11:34 -0000	1.7
+++ buildtest.js	9 Nov 2011 10:53:37 -0000	1.8
@@ -142,6 +142,16 @@
 	if (indivTest.hasAttribute("profile")) {
 	    cssprofile = indivTest.getAttribute("profile");
 	}
+        // check the warning level
+        var warningLevel = 1;
+        if (indivTest.hasAttribute("warning")) {
+            warningLevel = indivTest.getAttribute("warning");
+        }
+        // check medium
+        var medium = "all";
+        if (indivTest.hasAttribute("medium")) {
+            medium = indivTest.getAttribute("medium");
+        }
 	// and the test case local file... or URI.
 	var testfile = indivTest.getElementsByTagName("file");
 	if (testfile.length != 0) {
@@ -203,7 +213,7 @@
 	anc =  document.createElement("a");
 	var checkuri = validator_uri+"validator?uri="+
 	    urlencode(testfile)+"&profile="+
-	    cssprofile+"&usermedium=all&warning=1"; 
+	    cssprofile+"&usermedium="+medium+"&warning="+warningLevel; 
 	// FIXME medium, warning level
 	anc.setAttribute("href",checkuri);
 	text = document.createTextNode("[Result]");
Received on Wednesday, 9 November 2011 10:53:44 UTC

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