| This test checks the use of SVGAnimatedEnumeration within SVGFEBlendElement |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| |
| Check initial 'mode' value |
| PASS feBlendElement.mode.toString() is "[object SVGAnimatedEnumeration]" |
| PASS typeof(feBlendElement.mode.baseVal) is "number" |
| PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_NORMAL |
| |
| Switch to 'multiply' |
| PASS feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_MULTIPLY is SVGFEBlendElement.SVG_FEBLEND_MODE_MULTIPLY |
| PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_MULTIPLY |
| PASS feBlendElement.getAttribute('mode') is "multiply" |
| |
| Switch to 'screen' |
| PASS feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_SCREEN is SVGFEBlendElement.SVG_FEBLEND_MODE_SCREEN |
| PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_SCREEN |
| PASS feBlendElement.getAttribute('mode') is "screen" |
| |
| Switch to 'darken' |
| PASS feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_DARKEN is SVGFEBlendElement.SVG_FEBLEND_MODE_DARKEN |
| PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_DARKEN |
| PASS feBlendElement.getAttribute('mode') is "darken" |
| |
| Switch to 'lighten' |
| PASS feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_LIGHTEN is SVGFEBlendElement.SVG_FEBLEND_MODE_LIGHTEN |
| PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_LIGHTEN |
| PASS feBlendElement.getAttribute('mode') is "lighten" |
| |
| Try setting invalid values |
| PASS feBlendElement.mode.baseVal = 6 threw exception TypeError: Type error. |
| PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_LIGHTEN |
| PASS feBlendElement.getAttribute('mode') is "lighten" |
| PASS feBlendElement.mode.baseVal = -1 threw exception TypeError: Type error. |
| PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_LIGHTEN |
| PASS feBlendElement.getAttribute('mode') is "lighten" |
| PASS feBlendElement.mode.baseVal = 0 threw exception TypeError: Type error. |
| PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_LIGHTEN |
| PASS feBlendElement.getAttribute('mode') is "lighten" |
| |
| Switch to 'normal' |
| PASS feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_NORMAL is SVGFEBlendElement.SVG_FEBLEND_MODE_NORMAL |
| PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_NORMAL |
| PASS feBlendElement.getAttribute('mode') is "normal" |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |