OLD | NEW |
| (Empty) |
1 This test checks the use of SVGAnimatedEnumeration within SVGMarkerElement | |
2 | |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | |
4 | |
5 | |
6 | |
7 Check initial 'markerUnits' value | |
8 PASS markerElement.markerUnits.toString() is "[object SVGAnimatedEnumeration]" | |
9 PASS typeof(markerElement.markerUnits.baseVal) is "number" | |
10 PASS markerElement.markerUnits.baseVal is SVGMarkerElement.SVG_MARKERUNITS_USERS
PACEONUSE | |
11 | |
12 Switch to 'strokeWidth' | |
13 PASS markerElement.markerUnits.baseVal = SVGMarkerElement.SVG_MARKERUNITS_STROKE
WIDTH is SVGMarkerElement.SVG_MARKERUNITS_STROKEWIDTH | |
14 PASS markerElement.markerUnits.baseVal is SVGMarkerElement.SVG_MARKERUNITS_STROK
EWIDTH | |
15 PASS markerElement.getAttribute('markerUnits') is "strokeWidth" | |
16 | |
17 Try setting invalid values | |
18 PASS markerElement.markerUnits.baseVal = 3 threw exception TypeError: Failed to
set the 'baseVal' property on 'SVGAnimatedEnumeration': The enumeration value pr
ovided (3) is larger than the largest allowed value (2).. | |
19 PASS markerElement.markerUnits.baseVal is SVGMarkerElement.SVG_MARKERUNITS_STROK
EWIDTH | |
20 PASS markerElement.getAttribute('markerUnits') is "strokeWidth" | |
21 PASS markerElement.markerUnits.baseVal = -1 threw exception TypeError: Failed to
set the 'baseVal' property on 'SVGAnimatedEnumeration': The enumeration value p
rovided (65535) is larger than the largest allowed value (2).. | |
22 PASS markerElement.markerUnits.baseVal is SVGMarkerElement.SVG_MARKERUNITS_STROK
EWIDTH | |
23 PASS markerElement.getAttribute('markerUnits') is "strokeWidth" | |
24 PASS markerElement.markerUnits.baseVal = 0 threw exception TypeError: Failed to
set the 'baseVal' property on 'SVGAnimatedEnumeration': The enumeration value pr
ovided is 0, which is not settable.. | |
25 PASS markerElement.markerUnits.baseVal is SVGMarkerElement.SVG_MARKERUNITS_STROK
EWIDTH | |
26 PASS markerElement.getAttribute('markerUnits') is "strokeWidth" | |
27 | |
28 Switch to 'userSpaceOnUse' | |
29 PASS markerElement.markerUnits.baseVal = SVGMarkerElement.SVG_MARKERUNITS_USERSP
ACEONUSE is SVGMarkerElement.SVG_MARKERUNITS_USERSPACEONUSE | |
30 PASS markerElement.markerUnits.baseVal is SVGMarkerElement.SVG_MARKERUNITS_USERS
PACEONUSE | |
31 PASS markerElement.getAttribute('markerUnits') is "userSpaceOnUse" | |
32 | |
33 Check initial 'orient' value | |
34 PASS markerElement.orientType.toString() is "[object SVGAnimatedEnumeration]" | |
35 PASS typeof(markerElement.orientType.baseVal) is "number" | |
36 PASS markerElement.orientAngle.baseVal.value is 0 | |
37 PASS markerElement.orientAngle.baseVal.unitType is SVGAngle.SVG_ANGLETYPE_UNSPEC
IFIED | |
38 PASS markerElement.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_AUTO | |
39 | |
40 Switch to 'Pi/2 rad' value - via setOrientToAngle() | |
41 PASS anglePiHalfRad = svgElement.createSVGAngle(); anglePiHalfRad.newValueSpecif
iedUnits(SVGAngle.SVG_ANGLETYPE_RAD, (Math.PI / 2).toFixed(2)) is undefined. | |
42 PASS markerElement.setOrientToAngle(anglePiHalfRad) is undefined. | |
43 PASS markerElement.orientAngle.baseVal.value.toFixed(1) is "90.0" | |
44 PASS markerElement.orientAngle.baseVal.unitType is SVGAngle.SVG_ANGLETYPE_RAD | |
45 PASS markerElement.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGL
E | |
46 PASS markerElement.getAttribute('orient') is "1.57rad" | |
47 | |
48 Switch to 'auto' value - via setOrientToAuto() | |
49 PASS markerElement.setOrientToAuto() is undefined. | |
50 PASS markerElement.orientAngle.baseVal.value is 0 | |
51 PASS markerElement.orientAngle.baseVal.unitType is SVGAngle.SVG_ANGLETYPE_UNSPEC
IFIED | |
52 PASS markerElement.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_AUTO | |
53 PASS markerElement.getAttribute('orient') is "auto" | |
54 | |
55 Switch to '20deg' value - via setOrientToAngle() | |
56 PASS angle20deg = svgElement.createSVGAngle(); angle20deg.newValueSpecifiedUnits
(SVGAngle.SVG_ANGLETYPE_DEG, 20) is undefined. | |
57 PASS markerElement.setOrientToAngle(angle20deg) is undefined. | |
58 PASS markerElement.orientAngle.baseVal.value is 20 | |
59 PASS markerElement.orientAngle.baseVal.unitType is SVGAngle.SVG_ANGLETYPE_DEG | |
60 PASS markerElement.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGL
E | |
61 PASS markerElement.getAttribute('orient') is "20deg" | |
62 | |
63 Switch to '10deg' value | |
64 PASS markerElement.orientAngle.baseVal.value = 10 is 10 | |
65 PASS markerElement.orientAngle.baseVal.value is 10 | |
66 PASS markerElement.orientAngle.baseVal.unitType is SVGAngle.SVG_ANGLETYPE_DEG | |
67 PASS markerElement.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGL
E | |
68 PASS markerElement.getAttribute('orient') is "10deg" | |
69 | |
70 Switch to 'auto' value - by modifying orientType | |
71 PASS markerElement.orientType.baseVal = SVGMarkerElement.SVG_MARKER_ORIENT_AUTO
is SVGMarkerElement.SVG_MARKER_ORIENT_AUTO | |
72 PASS markerElement.orientAngle.baseVal.value is 0 | |
73 PASS markerElement.orientAngle.baseVal.unitType is SVGAngle.SVG_ANGLETYPE_UNSPEC
IFIED | |
74 PASS markerElement.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_AUTO | |
75 PASS markerElement.getAttribute('orient') is "auto" | |
76 | |
77 Try setting invalid values | |
78 PASS markerElement.orientType.baseVal = 3 threw exception TypeError: Failed to s
et the 'baseVal' property on 'SVGAnimatedEnumeration': The enumeration value pro
vided (3) is larger than the largest allowed value (2).. | |
79 PASS markerElement.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGL
E | |
80 PASS markerElement.getAttribute('orient') is "10deg" | |
81 PASS markerElement.orientType.baseVal = -1 threw exception TypeError: Failed to
set the 'baseVal' property on 'SVGAnimatedEnumeration': The enumeration value pr
ovided (65535) is larger than the largest allowed value (2).. | |
82 PASS markerElement.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGL
E | |
83 PASS markerElement.getAttribute('orient') is "10deg" | |
84 PASS markerElement.orientType.baseVal = 0 threw exception TypeError: Failed to s
et the 'baseVal' property on 'SVGAnimatedEnumeration': The enumeration value pro
vided is 0, which is not settable.. | |
85 PASS markerElement.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGL
E | |
86 PASS markerElement.getAttribute('orient') is "10deg" | |
87 | |
88 Switch back to 'auto' value | |
89 PASS markerElement.orientType.baseVal = SVGMarkerElement.SVG_MARKER_ORIENT_AUTO
is SVGMarkerElement.SVG_MARKER_ORIENT_AUTO | |
90 PASS markerElement.orientAngle.baseVal.value is 0 | |
91 PASS markerElement.orientAngle.baseVal.unitType is SVGAngle.SVG_ANGLETYPE_UNSPEC
IFIED | |
92 PASS markerElement.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_AUTO | |
93 PASS markerElement.getAttribute('orient') is "auto" | |
94 PASS successfullyParsed is true | |
95 | |
96 TEST COMPLETE | |
97 | |
OLD | NEW |