| This test checks the use of SVGAnimatedEnumeration within SVGFECompositeElement |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| |
| Check initial 'operator' value |
| PASS feCompositeElement.operator.toString() is "[object SVGAnimatedEnumeration]" |
| PASS typeof(feCompositeElement.operator.baseVal) is "number" |
| PASS feCompositeElement.operator.baseVal is SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OVER |
| |
| Switch to 'in' |
| PASS feCompositeElement.operator.baseVal = SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_IN is SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_IN |
| PASS feCompositeElement.operator.baseVal is SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_IN |
| PASS feCompositeElement.getAttribute('operator') is "in" |
| |
| Switch to 'over' |
| PASS feCompositeElement.operator.baseVal = SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OVER is SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OVER |
| PASS feCompositeElement.operator.baseVal is SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OVER |
| PASS feCompositeElement.getAttribute('operator') is "over" |
| |
| Switch to 'out' |
| PASS feCompositeElement.operator.baseVal = SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OUT is SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OUT |
| PASS feCompositeElement.operator.baseVal is SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OUT |
| PASS feCompositeElement.getAttribute('operator') is "out" |
| |
| Switch to 'atop' |
| PASS feCompositeElement.operator.baseVal = SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_ATOP is SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_ATOP |
| PASS feCompositeElement.operator.baseVal is SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_ATOP |
| PASS feCompositeElement.getAttribute('operator') is "atop" |
| |
| Switch to 'xor' |
| PASS feCompositeElement.operator.baseVal = SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_XOR is SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_XOR |
| PASS feCompositeElement.operator.baseVal is SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_XOR |
| PASS feCompositeElement.getAttribute('operator') is "xor" |
| |
| Switch to 'arithmetic' |
| PASS feCompositeElement.operator.baseVal = SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_ARITHMETIC is SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_ARITHMETIC |
| PASS feCompositeElement.operator.baseVal is SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_ARITHMETIC |
| PASS feCompositeElement.getAttribute('operator') is "arithmetic" |
| |
| Try setting invalid values |
| PASS feCompositeElement.operator.baseVal = 7 threw exception TypeError: Type error. |
| PASS feCompositeElement.operator.baseVal is SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_ARITHMETIC |
| PASS feCompositeElement.getAttribute('operator') is "arithmetic" |
| PASS feCompositeElement.operator.baseVal = -1 threw exception TypeError: Type error. |
| PASS feCompositeElement.operator.baseVal is SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_ARITHMETIC |
| PASS feCompositeElement.getAttribute('operator') is "arithmetic" |
| PASS feCompositeElement.operator.baseVal = 0 threw exception TypeError: Type error. |
| PASS feCompositeElement.operator.baseVal is SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_ARITHMETIC |
| PASS feCompositeElement.getAttribute('operator') is "arithmetic" |
| |
| Switch to 'lighter' |
| PASS feCompositeElement.operator.baseVal is SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_UNKNOWN |
| PASS feCompositeElement.getAttribute('operator') is "lighter" |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |