4 <script src=
"../../resources/js-test.js"></script>
6 var pathElement
= document
.createElementNS("http://www.w3.org/2000/svg","path");
8 shouldThrow('pathElement.getPointAtLength()',
9 '"TypeError: Failed to execute \'getPointAtLength\' on \'SVGPathElement\': 1 argument required, but only 0 present."');
10 shouldThrow('pathElement.getPointAtLength(NaN)',
11 '"TypeError: Failed to execute \'getPointAtLength\' on \'SVGPathElement\': The provided float value is non-finite."');
12 shouldThrow('pathElement.getPointAtLength(Infinity)',
13 '"TypeError: Failed to execute \'getPointAtLength\' on \'SVGPathElement\': The provided float value is non-finite."');
15 shouldThrow('pathElement.getPathSegAtLength()',
16 '"TypeError: Failed to execute \'getPathSegAtLength\' on \'SVGPathElement\': 1 argument required, but only 0 present."');
17 shouldThrow('pathElement.getPathSegAtLength(NaN)',
18 '"TypeError: Failed to execute \'getPathSegAtLength\' on \'SVGPathElement\': The provided float value is non-finite."');
19 shouldThrow('pathElement.getPathSegAtLength(Infinity)',
20 '"TypeError: Failed to execute \'getPathSegAtLength\' on \'SVGPathElement\': The provided float value is non-finite."');
22 shouldThrow('pathElement.createSVGPathSegMovetoAbs(0.0)',
23 '"TypeError: Failed to execute \'createSVGPathSegMovetoAbs\' on \'SVGPathElement\': 2 arguments required, but only 1 present."');
25 shouldThrow('pathElement.createSVGPathSegMovetoRel(0.0)',
26 '"TypeError: Failed to execute \'createSVGPathSegMovetoRel\' on \'SVGPathElement\': 2 arguments required, but only 1 present."');
28 shouldThrow('pathElement.createSVGPathSegLinetoAbs(0.0)',
29 '"TypeError: Failed to execute \'createSVGPathSegLinetoAbs\' on \'SVGPathElement\': 2 arguments required, but only 1 present."');
31 shouldThrow('pathElement.createSVGPathSegLinetoRel(0.0)',
32 '"TypeError: Failed to execute \'createSVGPathSegLinetoRel\' on \'SVGPathElement\': 2 arguments required, but only 1 present."');
34 shouldThrow('pathElement.createSVGPathSegCurvetoCubicAbs(0.0, 1.0, 2.0, 3.0, 4.0)',
35 '"TypeError: Failed to execute \'createSVGPathSegCurvetoCubicAbs\' on \'SVGPathElement\': 6 arguments required, but only 5 present."');
37 shouldThrow('pathElement.createSVGPathSegCurvetoCubicRel(0.0, 1.0, 2.0, 3.0, 4.0)',
38 '"TypeError: Failed to execute \'createSVGPathSegCurvetoCubicRel\' on \'SVGPathElement\': 6 arguments required, but only 5 present."');
40 shouldThrow('pathElement.createSVGPathSegCurvetoQuadraticAbs(0.0, 1.0, 2.0)',
41 '"TypeError: Failed to execute \'createSVGPathSegCurvetoQuadraticAbs\' on \'SVGPathElement\': 4 arguments required, but only 3 present."');
43 shouldThrow('pathElement.createSVGPathSegCurvetoQuadraticRel(0.0, 1.0, 2.0)',
44 '"TypeError: Failed to execute \'createSVGPathSegCurvetoQuadraticRel\' on \'SVGPathElement\': 4 arguments required, but only 3 present."');
46 shouldThrow('pathElement.createSVGPathSegArcAbs(0.0, 1.0, 2.0, 3.0, 4.0, true)',
47 '"TypeError: Failed to execute \'createSVGPathSegArcAbs\' on \'SVGPathElement\': 7 arguments required, but only 6 present."');
49 shouldThrow('pathElement.createSVGPathSegArcRel(0.0, 1.0, 2.0, 3.0, 4.0, true)',
50 '"TypeError: Failed to execute \'createSVGPathSegArcRel\' on \'SVGPathElement\': 7 arguments required, but only 6 present."');
52 shouldThrow('pathElement.createSVGPathSegLinetoHorizontalAbs()',
53 '"TypeError: Failed to execute \'createSVGPathSegLinetoHorizontalAbs\' on \'SVGPathElement\': 1 argument required, but only 0 present."');
55 shouldThrow('pathElement.createSVGPathSegLinetoHorizontalRel()',
56 '"TypeError: Failed to execute \'createSVGPathSegLinetoHorizontalRel\' on \'SVGPathElement\': 1 argument required, but only 0 present."');
58 shouldThrow('pathElement.createSVGPathSegLinetoVerticalAbs()',
59 '"TypeError: Failed to execute \'createSVGPathSegLinetoVerticalAbs\' on \'SVGPathElement\': 1 argument required, but only 0 present."');
61 shouldThrow('pathElement.createSVGPathSegLinetoVerticalRel()',
62 '"TypeError: Failed to execute \'createSVGPathSegLinetoVerticalRel\' on \'SVGPathElement\': 1 argument required, but only 0 present."');
64 shouldThrow('pathElement.createSVGPathSegCurvetoCubicSmoothAbs(0.0, 1.0, 2.0)',
65 '"TypeError: Failed to execute \'createSVGPathSegCurvetoCubicSmoothAbs\' on \'SVGPathElement\': 4 arguments required, but only 3 present."');
67 shouldThrow('pathElement.createSVGPathSegCurvetoCubicSmoothRel(0.0, 1.0, 2.0)',
68 '"TypeError: Failed to execute \'createSVGPathSegCurvetoCubicSmoothRel\' on \'SVGPathElement\': 4 arguments required, but only 3 present."');
70 shouldThrow('pathElement.createSVGPathSegCurvetoQuadraticSmoothAbs(0.0)',
71 '"TypeError: Failed to execute \'createSVGPathSegCurvetoQuadraticSmoothAbs\' on \'SVGPathElement\': 2 arguments required, but only 1 present."');
73 shouldThrow('pathElement.createSVGPathSegCurvetoQuadraticSmoothRel(0.0)',
74 '"TypeError: Failed to execute \'createSVGPathSegCurvetoQuadraticSmoothRel\' on \'SVGPathElement\': 2 arguments required, but only 1 present."');
76 <p id=
"description">Test that correct exceptions are thrown from SVGPathElement methods.
</p>
77 <div id=
"console"></div>