haikuwebkit/LayoutTests/svg/dom/SVGAnimatedEnumeration-SVGC...

36 lines
1.9 KiB
Plaintext

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