OLD | NEW |
| (Empty) |
1 This test checks the use of SVGAnimatedEnumeration within SVGPatternElement | |
2 | |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | |
4 | |
5 | |
6 | |
7 Check initial 'patternUnits' value | |
8 PASS patternElement.patternUnits.toString() is "[object SVGAnimatedEnumeration]" | |
9 PASS typeof(patternElement.patternUnits.baseVal) is "number" | |
10 PASS patternElement.patternUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACE
ONUSE | |
11 | |
12 Switch to 'objectBoundingBox' | |
13 PASS patternElement.patternUnits.baseVal = SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUN
DINGBOX is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX | |
14 PASS patternElement.patternUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOU
NDINGBOX | |
15 PASS patternElement.getAttribute('patternUnits') is "objectBoundingBox" | |
16 | |
17 Try setting invalid values | |
18 PASS patternElement.patternUnits.baseVal = 3 threw exception TypeError: Failed t
o set the 'baseVal' property on 'SVGAnimatedEnumeration': The enumeration value
provided (3) is larger than the largest allowed value (2).. | |
19 PASS patternElement.patternUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOU
NDINGBOX | |
20 PASS patternElement.getAttribute('patternUnits') is "objectBoundingBox" | |
21 PASS patternElement.patternUnits.baseVal = -1 threw exception TypeError: Failed
to set the 'baseVal' property on 'SVGAnimatedEnumeration': The enumeration value
provided (65535) is larger than the largest allowed value (2).. | |
22 PASS patternElement.patternUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOU
NDINGBOX | |
23 PASS patternElement.getAttribute('patternUnits') is "objectBoundingBox" | |
24 PASS patternElement.patternUnits.baseVal = 0 threw exception TypeError: Failed t
o set the 'baseVal' property on 'SVGAnimatedEnumeration': The enumeration value
provided is 0, which is not settable.. | |
25 PASS patternElement.patternUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOU
NDINGBOX | |
26 PASS patternElement.getAttribute('patternUnits') is "objectBoundingBox" | |
27 | |
28 Switch to 'userSpaceOnUse' | |
29 PASS patternElement.patternUnits.baseVal = SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEO
NUSE is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE | |
30 PASS patternElement.patternUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACE
ONUSE | |
31 PASS patternElement.getAttribute('patternUnits') is "userSpaceOnUse" | |
32 | |
33 Check initial 'patternContentUnits' value | |
34 PASS patternElement.patternContentUnits.toString() is "[object SVGAnimatedEnumer
ation]" | |
35 PASS typeof(patternElement.patternContentUnits.baseVal) is "number" | |
36 PASS patternElement.patternContentUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_US
ERSPACEONUSE | |
37 | |
38 Switch to 'objectBoundingBox' | |
39 PASS patternElement.patternContentUnits.baseVal = SVGUnitTypes.SVG_UNIT_TYPE_OBJ
ECTBOUNDINGBOX is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX | |
40 PASS patternElement.patternContentUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OB
JECTBOUNDINGBOX | |
41 PASS patternElement.getAttribute('patternContentUnits') is "objectBoundingBox" | |
42 | |
43 Try setting invalid values | |
44 PASS patternElement.patternContentUnits.baseVal = 3 threw exception TypeError: F
ailed to set the 'baseVal' property on 'SVGAnimatedEnumeration': The enumeration
value provided (3) is larger than the largest allowed value (2).. | |
45 PASS patternElement.patternContentUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OB
JECTBOUNDINGBOX | |
46 PASS patternElement.getAttribute('patternContentUnits') is "objectBoundingBox" | |
47 PASS patternElement.patternContentUnits.baseVal = -1 threw exception TypeError:
Failed to set the 'baseVal' property on 'SVGAnimatedEnumeration': The enumeratio
n value provided (65535) is larger than the largest allowed value (2).. | |
48 PASS patternElement.patternContentUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OB
JECTBOUNDINGBOX | |
49 PASS patternElement.getAttribute('patternContentUnits') is "objectBoundingBox" | |
50 PASS patternElement.patternContentUnits.baseVal = 0 threw exception TypeError: F
ailed to set the 'baseVal' property on 'SVGAnimatedEnumeration': The enumeration
value provided is 0, which is not settable.. | |
51 PASS patternElement.patternContentUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OB
JECTBOUNDINGBOX | |
52 PASS patternElement.getAttribute('patternContentUnits') is "objectBoundingBox" | |
53 | |
54 Switch to 'userSpaceOnUse' | |
55 PASS patternElement.patternContentUnits.baseVal = SVGUnitTypes.SVG_UNIT_TYPE_USE
RSPACEONUSE is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE | |
56 PASS patternElement.patternContentUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_US
ERSPACEONUSE | |
57 PASS patternElement.getAttribute('patternContentUnits') is "userSpaceOnUse" | |
58 PASS successfullyParsed is true | |
59 | |
60 TEST COMPLETE | |
61 | |
OLD | NEW |