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 Error: SVG_INVALID_VALUE_ERR: DOM SVG Exception 1.
PASS feMorphologyElement.operator.baseVal is SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_DILATE
PASS feMorphologyElement.getAttribute('operator') is "dilate"
PASS feMorphologyElement.operator.baseVal = -1 threw exception Error: SVG_INVALID_VALUE_ERR: DOM SVG Exception 1.
PASS feMorphologyElement.operator.baseVal is SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_DILATE
PASS feMorphologyElement.getAttribute('operator') is "dilate"
PASS feMorphologyElement.operator.baseVal = 0 threw exception Error: SVG_INVALID_VALUE_ERR: DOM SVG Exception 1.
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

