OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>Historical SVG features must be removed</title> | 2 <title>Historical SVG features must be removed</title> |
3 <script src="/resources/testharness.js"></script> | 3 <script src="/resources/testharness.js"></script> |
4 <script src="/resources/testharnessreport.js"></script> | 4 <script src="/resources/testharnessreport.js"></script> |
5 <script> | 5 <script> |
6 var removedInterfaces = [ | 6 var removedInterfaces = [ |
7 "SVGAnimatedPathData", | 7 "SVGAnimatedPathData", |
8 "SVGColor", | 8 "SVGColor", |
9 "SVGDocument", | 9 "SVGDocument", |
10 "SVGElementInstanceList", | 10 "SVGElementInstanceList", |
(...skipping 14 matching lines...) Expand all Loading... |
25 } | 25 } |
26 | 26 |
27 var mixinInterfaces = [ | 27 var mixinInterfaces = [ |
28 "GetSVGDocument", | 28 "GetSVGDocument", |
29 "SVGAnimatedPoints", | 29 "SVGAnimatedPoints", |
30 "SVGElementInstance", | 30 "SVGElementInstance", |
31 "SVGFilterPrimitiveStandardAttributes", | 31 "SVGFilterPrimitiveStandardAttributes", |
32 "SVGFitToViewBox", | 32 "SVGFitToViewBox", |
33 "SVGTests", | 33 "SVGTests", |
34 "SVGURIReference", | 34 "SVGURIReference", |
35 "SVGUnitTypes", | |
36 "SVGZoomAndPan" | 35 "SVGZoomAndPan" |
37 ] | 36 ] |
38 for (var name of mixinInterfaces) { | 37 for (var name of mixinInterfaces) { |
39 test(function() { | 38 test(function() { |
40 assert_false(name in window) | 39 assert_false(name in window) |
41 }, name + " mixin interface must not be exposed") | 40 }, name + " mixin interface must not be exposed") |
42 } | 41 } |
43 | 42 |
44 var removedMembers = { | 43 var removedMembers = { |
45 "SVGElement": [ | 44 "SVGElement": [ |
(...skipping 28 matching lines...) Expand all Loading... |
74 "getPointAtLength", | 73 "getPointAtLength", |
75 "getTotalLength", | 74 "getTotalLength", |
76 "pathLength" | 75 "pathLength" |
77 ] | 76 ] |
78 for (var member of movedPathMembers) { | 77 for (var member of movedPathMembers) { |
79 test(function() { | 78 test(function() { |
80 assert_false(SVGPathElement.prototype.hasOwnProperty(member)) | 79 assert_false(SVGPathElement.prototype.hasOwnProperty(member)) |
81 assert_true(SVGGeometryElement.prototype.hasOwnProperty(member)) | 80 assert_true(SVGGeometryElement.prototype.hasOwnProperty(member)) |
82 }, "SVGPathElement.prototype." + member + " must be moved to SVGGeometryElemen
t.prototype") | 81 }, "SVGPathElement.prototype." + member + " must be moved to SVGGeometryElemen
t.prototype") |
83 } | 82 } |
| 83 |
| 84 var implementedSVGUnitTypes = [ |
| 85 "SVGClipPathElement", |
| 86 "SVGFilterElement", |
| 87 "SVGGradientElement", |
| 88 "SVGMaskElement", |
| 89 "SVGPatternElement" |
| 90 ] |
| 91 for (var name of implementedSVGUnitTypes) { |
| 92 test(function() { |
| 93 assert_true(name in window); |
| 94 var interfaceObject = window[name]; |
| 95 assert_false("SVG_UNIT_TYPE_UNKNOWN" in interfaceObject); |
| 96 assert_false("SVG_UNIT_TYPE_USERSPACEONUSE" in interfaceObject); |
| 97 assert_false("SVG_UNIT_TYPE_OBJECTBOUNDINGBOX" in interfaceObject); |
| 98 }, name + " must not implement SVGUnitTypes") |
| 99 } |
84 </script> | 100 </script> |
OLD | NEW |