1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
<!DOCTYPE html>
<title>Historical SVG features must be removed</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
var removedInterfaces = [
"SVGAltGlyphElement",
"SVGAltGlyphDefElement",
"SVGAltGlyphItemElement",
"SVGAnimatedPathData",
"SVGColor",
"SVGColorProfileElement",
"SVGColorProfileRule",
"SVGCursorElement",
"SVGDocument",
"SVGElementInstanceList",
"SVGExternalResourcesRequired",
"SVGFontElement",
"SVGFontFaceElement",
"SVGFontFaceSrcElement",
"SVGFontFaceUriElement",
"SVGFontFaceFormatElement",
"SVGGlyphElement",
"SVGGlyphRefElement",
"SVGHKernElement",
"SVGICCColor",
"SVGLangSpace",
"SVGLocatable",
"SVGMissingGlyphElement",
"SVGTransformable",
"SVGTRefElement",
"SVGPaint",
"SVGPathSeg",
"SVGStylable",
"SVGVKernElement",
"SVGViewSpec",
"SVGZoomEvent"
]
for (var name of removedInterfaces) {
test(function() {
assert_false(name in window)
}, name + " interface must be removed")
}
var mixinInterfaces = [
"GetSVGDocument",
"SVGAnimatedPoints",
"SVGElementInstance",
"SVGFilterPrimitiveStandardAttributes",
"SVGFitToViewBox",
"SVGTests",
"SVGURIReference",
"SVGZoomAndPan"
]
for (var name of mixinInterfaces) {
test(function() {
assert_false(name in window)
}, name + " mixin interface must not be exposed")
}
var removedMembers = {
"SVGElement": [
"getPresentationAttribute",
"xmlbase",
"xmllang",
"xmlspace"
],
"SVGGraphicsElement": [
"farthestViewportElement",
"getTransformToElement",
"hasExtension",
"nearestViewportElement",
"requiredFeatures"
],
"SVGSVGElement": [
"currentView",
"pixelUnitToMillimeterX",
"pixelUnitToMillimeterY",
"screenPixelToMillimeterX",
"screenPixelToMillimeterY",
"useCurrentView",
"viewport"
],
"SVGViewElement": [
"viewTarget"
]
}
for (var name in removedMembers) {
for (var member of removedMembers[name]) {
test(function() {
assert_false(member in window[name].prototype)
}, name + ".prototype." + member + " must be removed")
}
}
var movedPathMembers = [
"getPointAtLength",
"getTotalLength",
"pathLength"
]
for (var member of movedPathMembers) {
test(function() {
assert_false(SVGPathElement.prototype.hasOwnProperty(member))
assert_true(SVGGeometryElement.prototype.hasOwnProperty(member))
}, "SVGPathElement.prototype." + member + " must be moved to SVGGeometryElement.prototype")
}
var implementedSVGUnitTypes = [
"SVGClipPathElement",
"SVGFilterElement",
"SVGGradientElement",
"SVGMaskElement",
"SVGPatternElement"
]
for (var name of implementedSVGUnitTypes) {
test(function() {
assert_true(name in window);
var interfaceObject = window[name];
assert_false("SVG_UNIT_TYPE_UNKNOWN" in interfaceObject);
assert_false("SVG_UNIT_TYPE_USERSPACEONUSE" in interfaceObject);
assert_false("SVG_UNIT_TYPE_OBJECTBOUNDINGBOX" in interfaceObject);
}, name + " must not implement SVGUnitTypes")
}
</script>
|