| This test checks the use of SVGAnimatedEnumeration within SVGFilterElement |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| |
| Check initial 'filterUnits' value |
| PASS filterElement.filterUnits.toString() is "[object SVGAnimatedEnumeration]" |
| PASS typeof(filterElement.filterUnits.baseVal) is "number" |
| PASS filterElement.filterUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE |
| |
| Switch to 'objectBoundingBox' |
| PASS filterElement.filterUnits.baseVal = SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX |
| PASS filterElement.filterUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX |
| PASS filterElement.getAttribute('filterUnits') is "objectBoundingBox" |
| |
| Try setting invalid values |
| PASS filterElement.filterUnits.baseVal = 3 threw exception TypeError: Type error. |
| PASS filterElement.filterUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX |
| PASS filterElement.getAttribute('filterUnits') is "objectBoundingBox" |
| PASS filterElement.filterUnits.baseVal = -1 threw exception TypeError: Type error. |
| PASS filterElement.filterUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX |
| PASS filterElement.getAttribute('filterUnits') is "objectBoundingBox" |
| PASS filterElement.filterUnits.baseVal = 0 threw exception TypeError: Type error. |
| PASS filterElement.filterUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX |
| PASS filterElement.getAttribute('filterUnits') is "objectBoundingBox" |
| |
| Switch to 'userSpaceOnUse' |
| PASS filterElement.filterUnits.baseVal = SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE |
| PASS filterElement.filterUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE |
| PASS filterElement.getAttribute('filterUnits') is "userSpaceOnUse" |
| |
| Check initial 'primitiveUnits' value |
| PASS filterElement.primitiveUnits.toString() is "[object SVGAnimatedEnumeration]" |
| PASS typeof(filterElement.primitiveUnits.baseVal) is "number" |
| PASS filterElement.primitiveUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE |
| |
| Switch to 'objectBoundingBox' |
| PASS filterElement.primitiveUnits.baseVal = SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX |
| PASS filterElement.primitiveUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX |
| PASS filterElement.getAttribute('primitiveUnits') is "objectBoundingBox" |
| |
| Try setting invalid values |
| PASS filterElement.primitiveUnits.baseVal = 3 threw exception TypeError: Type error. |
| PASS filterElement.primitiveUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX |
| PASS filterElement.getAttribute('primitiveUnits') is "objectBoundingBox" |
| PASS filterElement.primitiveUnits.baseVal = -1 threw exception TypeError: Type error. |
| PASS filterElement.primitiveUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX |
| PASS filterElement.getAttribute('primitiveUnits') is "objectBoundingBox" |
| PASS filterElement.primitiveUnits.baseVal = 0 threw exception TypeError: Type error. |
| PASS filterElement.primitiveUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX |
| PASS filterElement.getAttribute('primitiveUnits') is "objectBoundingBox" |
| |
| Switch to 'userSpaceOnUse' |
| PASS filterElement.primitiveUnits.baseVal = SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE |
| PASS filterElement.primitiveUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE |
| PASS filterElement.getAttribute('primitiveUnits') is "userSpaceOnUse" |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |