1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <svg xmlns=
"http://www.w3.org/2000/svg" onload=
"runTest()">
3 <script type=
"text/ecmascript"><![CDATA[
5 testRunner.dumpAsText();
7 function expect(string, val) {
8 var b = eval(string) == val;
9 var message = (string +
"") +
" " + (b ?
"PASSED" :
"FAILED (actual: '" + eval(string) +
"' expected: '" + val +
"')");
10 var txt = document.createElementNS(
"http://www.w3.org/2000/svg",
"text");
11 var textNode = document.createTextNode(message);
12 txt.appendChild(textNode);
13 document.rootElement.appendChild(txt);
16 function expect_failure(string, val) {
18 try { b = eval(string); } catch(e) { }
19 var message = (string +
"") +
" " +
"EXPECTED FAILURE (actual: '" + b +
"' expected: '" + val +
"')";
20 var txt = document.createElementNS(
"http://www.w3.org/2000/svg",
"text");
21 var textNode = document.createTextNode(message);
22 txt.appendChild(textNode);
23 document.rootElement.appendChild(txt);
27 expect(
"SVGAngle.SVG_ANGLETYPE_UNKNOWN",
0);
28 expect(
"SVGAngle.SVG_ANGLETYPE_UNSPECIFIED",
1);
29 expect(
"SVGAngle.SVG_ANGLETYPE_DEG",
2);
30 expect(
"SVGAngle.SVG_ANGLETYPE_RAD",
3);
31 expect(
"SVGAngle.SVG_ANGLETYPE_GRAD",
4)
33 if (window.SVGComponentTransferFunctionElement) {
34 expect(
"SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN",
0);
35 expect(
"SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY",
1);
36 expect(
"SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_TABLE",
2);
37 expect(
"SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE",
3);
38 expect(
"SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR",
4);
39 expect(
"SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_GAMMA",
5);
42 expect_failure(
"SVGCSSRule.COLOR_PROFILE_RULE",
7);
44 if (window.SVGComponentTransferFunctionElement) {
45 expect(
"SVGFEBlendElement.SVG_FEBLEND_MODE_UNKNOWN",
0);
46 expect(
"SVGFEBlendElement.SVG_FEBLEND_MODE_NORMAL",
1); // Highlights a HASH bug!
47 expect(
"SVGFEBlendElement.SVG_FEBLEND_MODE_MULTIPLY",
2);
48 expect(
"SVGFEBlendElement.SVG_FEBLEND_MODE_SCREEN",
3);
49 expect(
"SVGFEBlendElement.SVG_FEBLEND_MODE_DARKEN",
4);
50 expect(
"SVGFEBlendElement.SVG_FEBLEND_MODE_LIGHTEN",
5);
53 if (window.SVGFEColorMatrixElement) {
54 expect(
"SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_UNKNOWN",
0);
55 expect(
"SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_MATRIX",
1);
56 expect(
"SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_SATURATE",
2);
57 expect(
"SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_HUEROTATE",
3);
58 expect(
"SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA",
4);
61 if (window.SVGFECompositeElement) {
62 expect(
"SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_UNKNOWN",
0);
63 expect(
"SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OVER",
1);
64 expect(
"SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_IN",
2);
65 expect(
"SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OUT",
3);
66 expect(
"SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_ATOP",
4);
67 expect(
"SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_XOR",
5);
68 expect(
"SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_ARITHMETIC",
6);
71 if (window.SVGFEConvolveMatrixElement) {
72 expect(
"SVGFEConvolveMatrixElement.SVG_EDGEMODE_UNKNOWN",
0);
73 expect(
"SVGFEConvolveMatrixElement.SVG_EDGEMODE_DUPLICATE",
1);
74 expect(
"SVGFEConvolveMatrixElement.SVG_EDGEMODE_WRAP",
2);
75 expect(
"SVGFEConvolveMatrixElement.SVG_EDGEMODE_NONE",
3);
78 if (window.SVGFEDisplacementMapElement) {
79 expect(
"SVGFEDisplacementMapElement.SVG_CHANNEL_UNKNOWN",
0);
80 expect(
"SVGFEDisplacementMapElement.SVG_CHANNEL_R",
1);
81 expect(
"SVGFEDisplacementMapElement.SVG_CHANNEL_G",
2);
82 expect(
"SVGFEDisplacementMapElement.SVG_CHANNEL_B",
3);
83 expect(
"SVGFEDisplacementMapElement.SVG_CHANNEL_A",
4);
86 if (window.SVGFEMorphologyElement) {
87 expect(
"SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_UNKNOWN",
0);
88 expect(
"SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_ERODE",
1);
89 expect(
"SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_DILATE",
2);
92 if (window.SVGFETurbulenceElement) {
93 expect(
"SVGFETurbulenceElement.SVG_TURBULENCE_TYPE_UNKNOWN",
0);
94 expect(
"SVGFETurbulenceElement.SVG_TURBULENCE_TYPE_FRACTALNOISE",
1);
95 expect(
"SVGFETurbulenceElement.SVG_TURBULENCE_TYPE_TURBULENCE",
2);
96 expect(
"SVGFETurbulenceElement.SVG_STITCHTYPE_UNKNOWN",
0);
97 expect(
"SVGFETurbulenceElement.SVG_STITCHTYPE_STITCH",
1);
98 expect(
"SVGFETurbulenceElement.SVG_STITCHTYPE_NOSTITCH",
2);
101 expect(
"SVGGradientElement.SVG_SPREADMETHOD_UNKNOWN",
0);
102 expect(
"SVGGradientElement.SVG_SPREADMETHOD_PAD",
1);
103 expect(
"SVGGradientElement.SVG_SPREADMETHOD_REFLECT",
2);
104 expect(
"SVGGradientElement.SVG_SPREADMETHOD_REPEAT",
3);
106 expect(
"SVGLength.SVG_LENGTHTYPE_UNKNOWN",
0);
107 expect(
"SVGLength.SVG_LENGTHTYPE_NUMBER",
1);
108 expect(
"SVGLength.SVG_LENGTHTYPE_PERCENTAGE",
2);
109 expect(
"SVGLength.SVG_LENGTHTYPE_EMS",
3);
110 expect(
"SVGLength.SVG_LENGTHTYPE_EXS",
4);
111 expect(
"SVGLength.SVG_LENGTHTYPE_PX",
5);
112 expect(
"SVGLength.SVG_LENGTHTYPE_CM",
6);
113 expect(
"SVGLength.SVG_LENGTHTYPE_MM",
7);
114 expect(
"SVGLength.SVG_LENGTHTYPE_IN",
8);
115 expect(
"SVGLength.SVG_LENGTHTYPE_PT",
9);
116 expect(
"SVGLength.SVG_LENGTHTYPE_PC",
10)
118 expect(
"SVGMarkerElement.SVG_MARKERUNITS_UNKNOWN",
0);
119 expect(
"SVGMarkerElement.SVG_MARKERUNITS_USERSPACEONUSE",
1);
120 expect(
"SVGMarkerElement.SVG_MARKERUNITS_STROKEWIDTH",
2);
121 expect(
"SVGMarkerElement.SVG_MARKER_ORIENT_UNKNOWN",
0);
122 expect(
"SVGMarkerElement.SVG_MARKER_ORIENT_AUTO",
1);
123 expect(
"SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE",
2);
125 expect(
"SVGPathSeg.PATHSEG_UNKNOWN",
0);
126 expect(
"SVGPathSeg.PATHSEG_CLOSEPATH",
1);
127 expect(
"SVGPathSeg.PATHSEG_MOVETO_ABS",
2);
128 expect(
"SVGPathSeg.PATHSEG_MOVETO_REL",
3);
129 expect(
"SVGPathSeg.PATHSEG_LINETO_ABS",
4);
130 expect(
"SVGPathSeg.PATHSEG_LINETO_REL",
5);
131 expect(
"SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS",
6);
132 expect(
"SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL",
7);
133 expect(
"SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS",
8);
134 expect(
"SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL",
9);
135 expect(
"SVGPathSeg.PATHSEG_ARC_ABS",
10);
136 expect(
"SVGPathSeg.PATHSEG_ARC_REL",
11);
137 expect(
"SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS",
12);
138 expect(
"SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL",
13);
139 expect(
"SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS",
14);
140 expect(
"SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL",
15);
141 expect(
"SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS",
16);
142 expect(
"SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL",
17);
143 expect(
"SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS",
18);
144 expect(
"SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL",
19);
146 expect(
"SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_UNKNOWN",
0);
147 expect(
"SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_NONE",
1);
148 expect(
"SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMINYMIN",
2);
149 expect(
"SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMIN",
3);
150 expect(
"SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMAXYMIN",
4);
151 expect(
"SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMINYMID",
5);
152 expect(
"SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMID",
6);
153 expect(
"SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMAXYMID",
7);
154 expect(
"SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMINYMAX",
8);
155 expect(
"SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMAX",
9);
156 expect(
"SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMAXYMAX",
10);
157 expect(
"SVGPreserveAspectRatio.SVG_MEETORSLICE_UNKNOWN",
0);
158 expect(
"SVGPreserveAspectRatio.SVG_MEETORSLICE_MEET",
1);
159 expect(
"SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE",
2);
161 expect(
"SVGTextContentElement.LENGTHADJUST_UNKNOWN",
0);
162 expect(
"SVGTextContentElement.LENGTHADJUST_SPACING",
1);
163 expect(
"SVGTextContentElement.LENGTHADJUST_SPACINGANDGLYPHS",
2);
165 expect(
"SVGTextPathElement.TEXTPATH_METHODTYPE_UNKNOWN",
0);
166 expect(
"SVGTextPathElement.TEXTPATH_METHODTYPE_ALIGN",
1);
167 expect(
"SVGTextPathElement.TEXTPATH_METHODTYPE_STRETCH",
2);
168 expect(
"SVGTextPathElement.TEXTPATH_SPACINGTYPE_UNKNOWN",
0);
169 expect(
"SVGTextPathElement.TEXTPATH_SPACINGTYPE_AUTO",
1);
170 expect(
"SVGTextPathElement.TEXTPATH_SPACINGTYPE_EXACT",
2);
172 expect(
"SVGTransform.SVG_TRANSFORM_UNKNOWN",
0);
173 expect(
"SVGTransform.SVG_TRANSFORM_MATRIX",
1);
174 expect(
"SVGTransform.SVG_TRANSFORM_TRANSLATE",
2);
175 expect(
"SVGTransform.SVG_TRANSFORM_SCALE",
3);
176 expect(
"SVGTransform.SVG_TRANSFORM_ROTATE",
4);
177 expect(
"SVGTransform.SVG_TRANSFORM_SKEWX",
5);
178 expect(
"SVGTransform.SVG_TRANSFORM_SKEWY",
6);
180 expect(
"SVGUnitTypes.SVG_UNIT_TYPE_UNKNOWN",
0);
181 expect(
"SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE",
1);
182 expect(
"SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX",
2);
184 expect(
"SVGViewElement.SVG_ZOOMANDPAN_UNKNOWN",
0);
185 expect(
"SVGViewElement.SVG_ZOOMANDPAN_DISABLE",
1);
186 expect(
"SVGViewElement.SVG_ZOOMANDPAN_MAGNIFY",
2);