@@ -83,6 +83,30 @@ var YUITest = require("yuitest"),
8383
8484 var suite = new YUITest . TestSuite ( "Validation Tests" ) ;
8585
86+ suite . add ( new ValidationTestCase ( {
87+ property : "alignment-baseline" ,
88+
89+ valid : [
90+ "auto" ,
91+ "baseline" ,
92+ "use-script" ,
93+ "before-edge" ,
94+ "text-before-edge" ,
95+ "after-edge" ,
96+ "text-after-edge" ,
97+ "central" ,
98+ "middle" ,
99+ "ideographic" ,
100+ "alphabetic" ,
101+ "hanging" ,
102+ "mathematical"
103+ ] ,
104+
105+ invalid : {
106+ "foo" : "Expected (auto | baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical) but found 'foo'."
107+ }
108+ } ) ) ;
109+
86110 suite . add ( new ValidationTestCase ( {
87111 property : "animation-direction" ,
88112
@@ -312,8 +336,21 @@ var YUITest = require("yuitest"),
312336 }
313337 } ) ) ;
314338
339+ suite . add ( new ValidationTestCase ( {
340+ property : "baseline-shift" ,
315341
342+ valid : [
343+ "baseline" ,
344+ "sub" ,
345+ "super" ,
346+ "5%" ,
347+ "2px"
348+ ] ,
316349
350+ invalid : {
351+ "foo" : "Expected (baseline | sub | super | <percentage> | <length>) but found 'foo'."
352+ }
353+ } ) ) ;
317354
318355 suite . add ( new ValidationTestCase ( {
319356 property : "border" ,
@@ -683,6 +720,48 @@ var YUITest = require("yuitest"),
683720 }
684721 } ) ) ;
685722
723+ suite . add ( new ValidationTestCase ( {
724+ property : "color-interpolation" ,
725+
726+ valid : [
727+ "auto" ,
728+ "sRGB" ,
729+ "linearRGB"
730+ ] ,
731+
732+ invalid : {
733+ "foo" : "Expected (auto | sRGB | linearRGB) but found 'foo'."
734+ }
735+ } ) ) ;
736+
737+ suite . add ( new ValidationTestCase ( {
738+ property : "color-interpolation-filters" ,
739+
740+ valid : [
741+ "auto" ,
742+ "sRGB" ,
743+ "linearRGB"
744+ ] ,
745+
746+ invalid : {
747+ "foo" : "Expected (auto | sRGB | linearRGB) but found 'foo'."
748+ }
749+ } ) ) ;
750+
751+ suite . add ( new ValidationTestCase ( {
752+ property : "color-rendering" ,
753+
754+ valid : [
755+ "auto" ,
756+ "optimizeSpeed" ,
757+ "optimizeQuality"
758+ ] ,
759+
760+ invalid : {
761+ "foo" : "Expected (auto | optimizeSpeed | optimizeQuality) but found 'foo'."
762+ }
763+ } ) ) ;
764+
686765 suite . add ( new ValidationTestCase ( {
687766 property : "display" ,
688767
@@ -741,6 +820,61 @@ var YUITest = require("yuitest"),
741820 }
742821 } ) ) ;
743822
823+ suite . add ( new ValidationTestCase ( {
824+ property : "dominant-baseline" ,
825+
826+ valid : [
827+ "auto" ,
828+ "use-script" ,
829+ "no-change" ,
830+ "reset-size" ,
831+ "ideographic" ,
832+ "alphabetic" ,
833+ "hanging" ,
834+ "mathematical" ,
835+ "central" ,
836+ "middle" ,
837+ "text-after-edge" ,
838+ "text-before-edge"
839+ ] ,
840+
841+ invalid : {
842+ "foo" : "Expected (auto | use-script | no-change | reset-size | ideographic | alphabetic | hanging | mathematical | central | middle | text-after-edge | text-before-edge) but found 'foo'."
843+ }
844+ } ) ) ;
845+
846+ suite . add ( new ValidationTestCase ( {
847+ property : "fill-opacity" ,
848+
849+ valid : [
850+ "0" ,
851+ "0.5" ,
852+ "1"
853+ ] ,
854+
855+ invalid : {
856+ "-0.75" : "Expected (<opacity-value>) but found '-0.75'." ,
857+ "12" : "Expected (<opacity-value>) but found '12'." ,
858+ "foo" : "Expected (<opacity-value>) but found 'foo'."
859+ }
860+ } ) ) ;
861+
862+ suite . add ( new ValidationTestCase ( {
863+ property : "flood-opacity" ,
864+
865+ valid : [
866+ "0" ,
867+ "0.5" ,
868+ "1"
869+ ] ,
870+
871+ invalid : {
872+ "-0.75" : "Expected (<opacity-value>) but found '-0.75'." ,
873+ "12" : "Expected (<opacity-value>) but found '12'." ,
874+ "foo" : "Expected (<opacity-value>) but found 'foo'."
875+ }
876+ } ) ) ;
877+
744878 suite . add ( new ValidationTestCase ( {
745879 property : "font" ,
746880
@@ -883,6 +1017,35 @@ var YUITest = require("yuitest"),
8831017 ]
8841018 } ) ) ;
8851019
1020+ suite . add ( new ValidationTestCase ( {
1021+ property : "image-rendering" ,
1022+
1023+ valid : [
1024+ "auto" ,
1025+ "optimizeSpeed" ,
1026+ "optimizeQuality"
1027+ ] ,
1028+
1029+ invalid : {
1030+ "foo" : "Expected (auto | optimizeSpeed | optimizeQuality) but found 'foo'."
1031+ }
1032+ } ) ) ;
1033+
1034+ suite . add ( new ValidationTestCase ( {
1035+ property : "kerning" ,
1036+
1037+ valid : [
1038+ "auto" ,
1039+ "0.1em" ,
1040+ "1px"
1041+ ] ,
1042+
1043+ invalid : {
1044+ "5%" : "Expected (auto | <length>) but found '5%'." ,
1045+ "foo" : "Expected (auto | <length>) but found 'foo'."
1046+ }
1047+ } ) ) ;
1048+
8861049 suite . add ( new ValidationTestCase ( {
8871050 property : "min-height" ,
8881051
@@ -1119,6 +1282,62 @@ var YUITest = require("yuitest"),
11191282 }
11201283 } ) ) ;
11211284
1285+ suite . add ( new ValidationTestCase ( {
1286+ property : "shape-rendering" ,
1287+
1288+ valid : [
1289+ "auto" ,
1290+ "optimizeSpeed" ,
1291+ "crispEdges" ,
1292+ "geometricPrecision"
1293+ ] ,
1294+
1295+ invalid : {
1296+ "foo" : "Expected (auto | optimizeSpeed | crispEdges | geometricPrecision) but found 'foo'."
1297+ }
1298+ } ) ) ;
1299+
1300+ suite . add ( new ValidationTestCase ( {
1301+ property : "stop-opacity" ,
1302+
1303+ valid : [
1304+ "0" ,
1305+ "0.5" ,
1306+ "1"
1307+ ] ,
1308+
1309+ invalid : {
1310+ "foo" : "Expected (<opacity-value>) but found 'foo'."
1311+ }
1312+ } ) ) ;
1313+
1314+ suite . add ( new ValidationTestCase ( {
1315+ property : "stroke-opacity" ,
1316+
1317+ valid : [
1318+ "0" ,
1319+ "0.5" ,
1320+ "1"
1321+ ] ,
1322+
1323+ invalid : {
1324+ "foo" : "Expected (<opacity-value>) but found 'foo'."
1325+ }
1326+ } ) ) ;
1327+
1328+ suite . add ( new ValidationTestCase ( {
1329+ property : "stroke-width" ,
1330+
1331+ valid : [
1332+ "5%" ,
1333+ "2px"
1334+ ] ,
1335+
1336+ invalid : {
1337+ "foo" : "Expected (<percentage> | <length>) but found 'foo'."
1338+ }
1339+ } ) ) ;
1340+
11221341 suite . add ( new ValidationTestCase ( {
11231342 property : "text-anchor" ,
11241343
0 commit comments