diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/svg/historical.html | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/svg/historical.html')
-rw-r--r-- | testing/web-platform/tests/svg/historical.html | 124 |
1 files changed, 124 insertions, 0 deletions
diff --git a/testing/web-platform/tests/svg/historical.html b/testing/web-platform/tests/svg/historical.html new file mode 100644 index 0000000000..47935c6461 --- /dev/null +++ b/testing/web-platform/tests/svg/historical.html @@ -0,0 +1,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> |