blob: 9ea2f123a6575886a4c869111e28f6182a559e14 [file] [log] [blame]
SVG 1.1 dynamic update tests
Tests dynamic updates of the 'orient' attribute of the SVGMarkerElement object
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Test initial state
PASS markerElement.orient is "45"
PASS markerElement.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE
PASS markerElement.orientAngle.baseVal.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED
PASS markerElement.orientAngle.baseVal.value is 45
PASS markerElement.getAttribute('orient') is "45"
Test the 'orient' property
PASS markerElement.orient = 'auto' is "auto"
PASS markerElement.orient is "auto"
PASS markerElement.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_AUTO
PASS markerElement.orientAngle.baseVal.value is 0
PASS markerElement.getAttribute('orient') is "auto"
PASS markerElement.orient = 'auto-start-reverse' is "auto-start-reverse"
PASS markerElement.orient is "auto-start-reverse"
PASS markerElement.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_UNKNOWN
PASS markerElement.orientAngle.baseVal.value is 0
PASS markerElement.getAttribute('orient') is "auto-start-reverse"
PASS markerElement.orient = '45deg' is "45deg"
PASS markerElement.orient is "45deg"
PASS markerElement.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE
PASS markerElement.orientAngle.baseVal.unitType is SVGAngle.SVG_ANGLETYPE_DEG
PASS markerElement.orientAngle.baseVal.value is 45
PASS markerElement.getAttribute('orient') is "45deg"
Test the method setOrientToAngle()
PASS markerElement.setOrientToAngle(angle) is undefined.
PASS markerElement.orient is "1.57rad"
PASS markerElement.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE
PASS markerElement.orientAngle.baseVal.unitType is SVGAngle.SVG_ANGLETYPE_RAD
PASS markerElement.orientAngle.baseVal.value.toFixed(1) is "90.0"
PASS markerElement.getAttribute('orient') is "1.57rad"
Test the method setOrientToAuto()
PASS markerElement.setOrientToAuto() is undefined.
PASS markerElement.orient is "auto"
PASS markerElement.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_AUTO
PASS markerElement.orientAngle.baseVal.value is 0
PASS markerElement.getAttribute('orient') is "auto"
Test the animated property 'orientAngle'
PASS markerElement.orientAngle.baseVal.value = 45 is 45
PASS markerElement.orient is "45"
PASS markerElement.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE
PASS markerElement.orientAngle.baseVal.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED
PASS markerElement.orientAngle.baseVal.value is 45
PASS markerElement.getAttribute('orient') is "45"
Test the animated property 'orientType'
PASS markerElement.orientType.baseVal = SVGMarkerElement.SVG_MARKER_ORIENT_AUTO is SVGMarkerElement.SVG_MARKER_ORIENT_AUTO
PASS markerElement.orient is "auto"
PASS markerElement.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_AUTO
PASS markerElement.orientAngle.baseVal.value is 0
PASS markerElement.getAttribute('orient') is "auto"
PASS markerElement.orientType.baseVal = SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE
PASS markerElement.orientAngle.baseVal.value = -45 is -45
PASS markerElement.orient is "-45"
PASS markerElement.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE
PASS markerElement.orientAngle.baseVal.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED
PASS markerElement.orientAngle.baseVal.value is -45
PASS markerElement.getAttribute('orient') is "-45"
Test the 'orient' attribute
PASS markerElement.setAttribute('orient', '0') is undefined.
PASS markerElement.orient is "0"
PASS markerElement.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE
PASS markerElement.orientAngle.baseVal.value is 0
PASS markerElement.getAttribute('orient') is "0"
PASS successfullyParsed is true
TEST COMPLETE