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
|
<!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 = [
"SVGAnimatedPathData",
"SVGColor",
"SVGDocument",
"SVGElementInstanceList",
"SVGExternalResourcesRequired",
"SVGICCColor",
"SVGLangSpace",
"SVGLocatable",
"SVGPaint",
"SVGPathSeg",
"SVGStylable",
"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",
"SVGUnitTypes",
"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": [
"getTransformToElement",
"hasExtension",
"requiredFeatures"
],
"SVGSVGElement": [
"currentView",
"useCurrentView",
"viewport"
]
}
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")
}
</script>
|