blob: f7b3e5bfd074e6d1a0a6e1f81eef2fbc5cbe1be0 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" onload="runTest()">
<script type="text/ecmascript"><![CDATA[
if (window.testRunner)
testRunner.dumpAsText();
function expect(string, val) {
var b = eval(string) == val;
var message = (string + "") + " " + (b ? "PASSED" : "FAILED (actual: '" + eval(string) + "' expected: '" + val + "')");
var txt = document.createElementNS("http://www.w3.org/2000/svg", "text");
var textNode = document.createTextNode(message);
txt.appendChild(textNode);
document.rootElement.appendChild(txt);
}
function runTest() {
expect("SVGAngle.SVG_ANGLETYPE_UNKNOWN", 0);
expect("SVGAngle.SVG_ANGLETYPE_UNSPECIFIED", 1);
expect("SVGAngle.SVG_ANGLETYPE_DEG", 2);
expect("SVGAngle.SVG_ANGLETYPE_RAD", 3);
expect("SVGAngle.SVG_ANGLETYPE_GRAD", 4)
if (window.SVGComponentTransferFunctionElement) {
expect("SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN", 0);
expect("SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY", 1);
expect("SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_TABLE", 2);
expect("SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE", 3);
expect("SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR", 4);
expect("SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_GAMMA", 5);
}
if (window.SVGComponentTransferFunctionElement) {
expect("SVGFEBlendElement.SVG_FEBLEND_MODE_UNKNOWN", 0);
expect("SVGFEBlendElement.SVG_FEBLEND_MODE_NORMAL", 1); // Highlights a HASH bug!
expect("SVGFEBlendElement.SVG_FEBLEND_MODE_MULTIPLY", 2);
expect("SVGFEBlendElement.SVG_FEBLEND_MODE_SCREEN", 3);
expect("SVGFEBlendElement.SVG_FEBLEND_MODE_DARKEN", 4);
expect("SVGFEBlendElement.SVG_FEBLEND_MODE_LIGHTEN", 5);
}
if (window.SVGFEColorMatrixElement) {
expect("SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_UNKNOWN", 0);
expect("SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_MATRIX", 1);
expect("SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_SATURATE", 2);
expect("SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_HUEROTATE", 3);
expect("SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA", 4);
}
if (window.SVGFECompositeElement) {
expect("SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_UNKNOWN", 0);
expect("SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OVER", 1);
expect("SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_IN", 2);
expect("SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OUT", 3);
expect("SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_ATOP", 4);
expect("SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_XOR", 5);
expect("SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_ARITHMETIC", 6);
}
if (window.SVGFEConvolveMatrixElement) {
expect("SVGFEConvolveMatrixElement.SVG_EDGEMODE_UNKNOWN", 0);
expect("SVGFEConvolveMatrixElement.SVG_EDGEMODE_DUPLICATE", 1);
expect("SVGFEConvolveMatrixElement.SVG_EDGEMODE_WRAP", 2);
expect("SVGFEConvolveMatrixElement.SVG_EDGEMODE_NONE", 3);
}
if (window.SVGFEDisplacementMapElement) {
expect("SVGFEDisplacementMapElement.SVG_CHANNEL_UNKNOWN", 0);
expect("SVGFEDisplacementMapElement.SVG_CHANNEL_R", 1);
expect("SVGFEDisplacementMapElement.SVG_CHANNEL_G", 2);
expect("SVGFEDisplacementMapElement.SVG_CHANNEL_B", 3);
expect("SVGFEDisplacementMapElement.SVG_CHANNEL_A", 4);
}
if (window.SVGFEMorphologyElement) {
expect("SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_UNKNOWN", 0);
expect("SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_ERODE", 1);
expect("SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_DILATE", 2);
}
if (window.SVGFETurbulenceElement) {
expect("SVGFETurbulenceElement.SVG_TURBULENCE_TYPE_UNKNOWN", 0);
expect("SVGFETurbulenceElement.SVG_TURBULENCE_TYPE_FRACTALNOISE", 1);
expect("SVGFETurbulenceElement.SVG_TURBULENCE_TYPE_TURBULENCE", 2);
expect("SVGFETurbulenceElement.SVG_STITCHTYPE_UNKNOWN", 0);
expect("SVGFETurbulenceElement.SVG_STITCHTYPE_STITCH", 1);
expect("SVGFETurbulenceElement.SVG_STITCHTYPE_NOSTITCH", 2);
}
expect("SVGGradientElement.SVG_SPREADMETHOD_UNKNOWN", 0);
expect("SVGGradientElement.SVG_SPREADMETHOD_PAD", 1);
expect("SVGGradientElement.SVG_SPREADMETHOD_REFLECT", 2);
expect("SVGGradientElement.SVG_SPREADMETHOD_REPEAT", 3);
expect("SVGLength.SVG_LENGTHTYPE_UNKNOWN", 0);
expect("SVGLength.SVG_LENGTHTYPE_NUMBER", 1);
expect("SVGLength.SVG_LENGTHTYPE_PERCENTAGE", 2);
expect("SVGLength.SVG_LENGTHTYPE_EMS", 3);
expect("SVGLength.SVG_LENGTHTYPE_EXS", 4);
expect("SVGLength.SVG_LENGTHTYPE_PX", 5);
expect("SVGLength.SVG_LENGTHTYPE_CM", 6);
expect("SVGLength.SVG_LENGTHTYPE_MM", 7);
expect("SVGLength.SVG_LENGTHTYPE_IN", 8);
expect("SVGLength.SVG_LENGTHTYPE_PT", 9);
expect("SVGLength.SVG_LENGTHTYPE_PC", 10)
expect("SVGMarkerElement.SVG_MARKERUNITS_UNKNOWN", 0);
expect("SVGMarkerElement.SVG_MARKERUNITS_USERSPACEONUSE", 1);
expect("SVGMarkerElement.SVG_MARKERUNITS_STROKEWIDTH", 2);
expect("SVGMarkerElement.SVG_MARKER_ORIENT_UNKNOWN", 0);
expect("SVGMarkerElement.SVG_MARKER_ORIENT_AUTO", 1);
expect("SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE", 2);
expect("SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_UNKNOWN", 0);
expect("SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_NONE", 1);
expect("SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMINYMIN", 2);
expect("SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMIN", 3);
expect("SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMAXYMIN", 4);
expect("SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMINYMID", 5);
expect("SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMID", 6);
expect("SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMAXYMID", 7);
expect("SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMINYMAX", 8);
expect("SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMAX", 9);
expect("SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMAXYMAX", 10);
expect("SVGPreserveAspectRatio.SVG_MEETORSLICE_UNKNOWN", 0);
expect("SVGPreserveAspectRatio.SVG_MEETORSLICE_MEET", 1);
expect("SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE", 2);
expect("SVGTextContentElement.LENGTHADJUST_UNKNOWN", 0);
expect("SVGTextContentElement.LENGTHADJUST_SPACING", 1);
expect("SVGTextContentElement.LENGTHADJUST_SPACINGANDGLYPHS", 2);
expect("SVGTextPathElement.TEXTPATH_METHODTYPE_UNKNOWN", 0);
expect("SVGTextPathElement.TEXTPATH_METHODTYPE_ALIGN", 1);
expect("SVGTextPathElement.TEXTPATH_METHODTYPE_STRETCH", 2);
expect("SVGTextPathElement.TEXTPATH_SPACINGTYPE_UNKNOWN", 0);
expect("SVGTextPathElement.TEXTPATH_SPACINGTYPE_AUTO", 1);
expect("SVGTextPathElement.TEXTPATH_SPACINGTYPE_EXACT", 2);
expect("SVGTransform.SVG_TRANSFORM_UNKNOWN", 0);
expect("SVGTransform.SVG_TRANSFORM_MATRIX", 1);
expect("SVGTransform.SVG_TRANSFORM_TRANSLATE", 2);
expect("SVGTransform.SVG_TRANSFORM_SCALE", 3);
expect("SVGTransform.SVG_TRANSFORM_ROTATE", 4);
expect("SVGTransform.SVG_TRANSFORM_SKEWX", 5);
expect("SVGTransform.SVG_TRANSFORM_SKEWY", 6);
expect("SVGUnitTypes.SVG_UNIT_TYPE_UNKNOWN", 0);
expect("SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE", 1);
expect("SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX", 2);
expect("SVGViewElement.SVG_ZOOMANDPAN_UNKNOWN", 0);
expect("SVGViewElement.SVG_ZOOMANDPAN_DISABLE", 1);
expect("SVGViewElement.SVG_ZOOMANDPAN_MAGNIFY", 2);
}
]]></script>
</svg>