blob: da767e92494bc7be045df1abcf5c1f361d790d31 [file] [log] [blame]
This test checks the use of SVGAnimatedEnumeration within SVGFEMorphologyElement
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Check initial 'operator' value
PASS feMorphologyElement.operator.toString() is "[object SVGAnimatedEnumeration]"
PASS typeof(feMorphologyElement.operator.baseVal) is "number"
PASS feMorphologyElement.operator.baseVal is SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_ERODE
Switch to 'dilate'
PASS feMorphologyElement.operator.baseVal = SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_DILATE is SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_DILATE
PASS feMorphologyElement.operator.baseVal is SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_DILATE
PASS feMorphologyElement.getAttribute('operator') is "dilate"
Try setting invalid values
PASS feMorphologyElement.operator.baseVal = 4 threw exception TypeError: Type error.
PASS feMorphologyElement.operator.baseVal is SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_DILATE
PASS feMorphologyElement.getAttribute('operator') is "dilate"
PASS feMorphologyElement.operator.baseVal = -1 threw exception TypeError: Type error.
PASS feMorphologyElement.operator.baseVal is SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_DILATE
PASS feMorphologyElement.getAttribute('operator') is "dilate"
PASS feMorphologyElement.operator.baseVal = 0 threw exception TypeError: Type error.
PASS feMorphologyElement.operator.baseVal is SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_DILATE
PASS feMorphologyElement.getAttribute('operator') is "dilate"
Switch to 'erode'
PASS feMorphologyElement.operator.baseVal = SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_ERODE is SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_ERODE
PASS feMorphologyElement.operator.baseVal is SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_ERODE
PASS feMorphologyElement.getAttribute('operator') is "erode"
PASS successfullyParsed is true
TEST COMPLETE