Revision fab6e8e35344dc06267d1ba5a75780d0e0f3a6fc authored by pyup-bot on 20 September 2018, 19:34:23 UTC, committed by jgraham on 24 September 2018, 09:46:00 UTC
1 parent 82d852b
historical.html
<!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",
"SVGTransformable",
"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",
"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",
"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>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...