blob: 0e5be4e9cdd002266620d56525aa50e26f096fd5 [file] [log] [blame]
This test checks the use of SVGAnimatedEnumeration within SVGTextContentElement
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Check initial 'lengthAdjust' value
PASS textContentElement.lengthAdjust.toString() is "[object SVGAnimatedEnumeration]"
PASS typeof(textContentElement.lengthAdjust.baseVal) is "number"
PASS textContentElement.lengthAdjust.baseVal is SVGTextContentElement.LENGTHADJUST_SPACING
Switch to 'spacingAndGlyphs'
PASS textContentElement.lengthAdjust.baseVal = SVGTextContentElement.LENGTHADJUST_SPACINGANDGLYPHS is SVGTextContentElement.LENGTHADJUST_SPACINGANDGLYPHS
PASS textContentElement.lengthAdjust.baseVal is SVGTextContentElement.LENGTHADJUST_SPACINGANDGLYPHS
PASS textContentElement.getAttribute('lengthAdjust') is "spacingAndGlyphs"
Try setting invalid values
PASS textContentElement.lengthAdjust.baseVal = 3 threw exception TypeError: Type error.
PASS textContentElement.lengthAdjust.baseVal is SVGTextContentElement.LENGTHADJUST_SPACINGANDGLYPHS
PASS textContentElement.getAttribute('lengthAdjust') is "spacingAndGlyphs"
PASS textContentElement.lengthAdjust.baseVal = -1 threw exception TypeError: Type error.
PASS textContentElement.lengthAdjust.baseVal is SVGTextContentElement.LENGTHADJUST_SPACINGANDGLYPHS
PASS textContentElement.getAttribute('lengthAdjust') is "spacingAndGlyphs"
PASS textContentElement.lengthAdjust.baseVal = 0 threw exception TypeError: Type error.
PASS textContentElement.lengthAdjust.baseVal is SVGTextContentElement.LENGTHADJUST_SPACINGANDGLYPHS
PASS textContentElement.getAttribute('lengthAdjust') is "spacingAndGlyphs"
Switch to 'spacing'
PASS textContentElement.lengthAdjust.baseVal = SVGTextContentElement.LENGTHADJUST_SPACING is SVGTextContentElement.LENGTHADJUST_SPACING
PASS textContentElement.lengthAdjust.baseVal is SVGTextContentElement.LENGTHADJUST_SPACING
PASS textContentElement.getAttribute('lengthAdjust') is "spacing"
PASS successfullyParsed is true
TEST COMPLETE