Changeset 89315 in webkit
- Timestamp:
- Jun 20, 2011 4:54:07 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r89314 r89315 1 2011-06-20 Mark Pilgrim <pilgrim@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 IDL generator should throw TypeError instead of SyntaxError on not enough arguments 6 https://bugs.webkit.org/show_bug.cgi?id=63011 7 8 To align with WebIDL, we should throw TypeError whenever a function 9 is called with missing required arguments. 10 11 * fast/canvas/canvas-overloads-drawImageFromRect-expected.txt: 12 * fast/canvas/canvas-overloads-fillText-expected.txt: 13 * fast/canvas/canvas-overloads-strokeText-expected.txt: 14 * fast/canvas/script-tests/canvas-overloads-drawImageFromRect.js: 15 * fast/canvas/script-tests/canvas-overloads-fillText.js: 16 * fast/canvas/script-tests/canvas-overloads-strokeText.js: 17 * fast/canvas/webgl/data-view-test-expected.txt: 18 * http/tests/xmlhttprequest/exceptions-expected.txt: 19 * platform/chromium-mac/svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt: 20 * platform/chromium-win/svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt: 21 * svg/dom/SVGAngle-expected.txt: 22 * svg/dom/SVGColor-expected.txt: 23 * svg/dom/SVGLength-expected.txt: 24 * svg/dom/SVGLengthList-basics-expected.txt: 25 * svg/dom/SVGMatrix-expected.txt: 26 * svg/dom/SVGNumberList-basics-expected.txt: 27 * svg/dom/SVGPaint-expected.txt: 28 * svg/dom/SVGPoint-expected.txt: 29 * svg/dom/SVGPointList-basics-expected.txt: 30 * svg/dom/SVGStringList-basics-expected.txt: 31 * svg/dom/SVGTransform-expected.txt: 32 * svg/dom/SVGTransformList-basics-expected.txt: 33 * svg/dom/SVGTransformList-expected.txt: 34 * svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt: 35 1 36 2011-05-03 Martin Robinson <mrobinson@igalia.com> 2 37 -
trunk/LayoutTests/fast/canvas/canvas-overloads-drawImageFromRect-expected.txt
r87735 r89315 4 4 5 5 6 PASS ctx.drawImageFromRect() threw exception SyntaxError: Not enough arguments.6 PASS ctx.drawImageFromRect() threw exception TypeError: Not enough arguments. 7 7 PASS ctx.drawImageFromRect(imageElement) is undefined 8 8 PASS ctx.drawImageFromRect(imageElement, 0) is undefined -
trunk/LayoutTests/fast/canvas/canvas-overloads-fillText-expected.txt
r87729 r89315 4 4 5 5 6 PASS ctx.fillText() threw exception SyntaxError: Not enough arguments.7 PASS ctx.fillText('moo') threw exception SyntaxError: Not enough arguments.8 PASS ctx.fillText('moo',0) threw exception SyntaxError: Not enough arguments.6 PASS ctx.fillText() threw exception TypeError: Not enough arguments. 7 PASS ctx.fillText('moo') threw exception TypeError: Not enough arguments. 8 PASS ctx.fillText('moo',0) threw exception TypeError: Not enough arguments. 9 9 PASS ctx.fillText('moo',0,0) is undefined 10 10 PASS ctx.fillText('moo',0,0,0) is undefined -
trunk/LayoutTests/fast/canvas/canvas-overloads-strokeText-expected.txt
r87730 r89315 4 4 5 5 6 PASS ctx.strokeText() threw exception SyntaxError: Not enough arguments.7 PASS ctx.strokeText('moo') threw exception SyntaxError: Not enough arguments.8 PASS ctx.strokeText('moo',0) threw exception SyntaxError: Not enough arguments.6 PASS ctx.strokeText() threw exception TypeError: Not enough arguments. 7 PASS ctx.strokeText('moo') threw exception TypeError: Not enough arguments. 8 PASS ctx.strokeText('moo',0) threw exception TypeError: Not enough arguments. 9 9 PASS ctx.strokeText('moo',0,0) is undefined 10 10 PASS ctx.strokeText('moo',0,0,0) is undefined -
trunk/LayoutTests/fast/canvas/script-tests/canvas-overloads-drawImageFromRect.js
r87735 r89315 3 3 var ctx = document.createElement('canvas').getContext('2d'); 4 4 5 var SyntaxError = "SyntaxError: Not enough arguments";5 var NotEnoughArguments = "TypeError: Not enough arguments"; 6 6 7 7 var imageElement = document.createElement("img"); 8 shouldThrow("ctx.drawImageFromRect()", " SyntaxError");8 shouldThrow("ctx.drawImageFromRect()", "NotEnoughArguments"); 9 9 shouldBe("ctx.drawImageFromRect(imageElement)", "undefined"); 10 10 shouldBe("ctx.drawImageFromRect(imageElement, 0)", "undefined"); -
trunk/LayoutTests/fast/canvas/script-tests/canvas-overloads-fillText.js
r87729 r89315 3 3 var ctx = document.createElement('canvas').getContext('2d'); 4 4 5 var SyntaxError = "SyntaxError: Not enough arguments";5 var NotEnoughArguments = "TypeError: Not enough arguments"; 6 6 var TypeError = "TypeError: Type error"; 7 7 8 shouldThrow("ctx.fillText()", " SyntaxError");9 shouldThrow("ctx.fillText('moo')", " SyntaxError");10 shouldThrow("ctx.fillText('moo',0)", " SyntaxError");8 shouldThrow("ctx.fillText()", "NotEnoughArguments"); 9 shouldThrow("ctx.fillText('moo')", "NotEnoughArguments"); 10 shouldThrow("ctx.fillText('moo',0)", "NotEnoughArguments"); 11 11 shouldBe("ctx.fillText('moo',0,0)", "undefined"); 12 12 shouldBe("ctx.fillText('moo',0,0,0)", "undefined"); -
trunk/LayoutTests/fast/canvas/script-tests/canvas-overloads-strokeText.js
r87730 r89315 3 3 var ctx = document.createElement('canvas').getContext('2d'); 4 4 5 var SyntaxError = "SyntaxError: Not enough arguments";5 var NotEnoughArguments = "TypeError: Not enough arguments"; 6 6 7 shouldThrow("ctx.strokeText()", " SyntaxError");8 shouldThrow("ctx.strokeText('moo')", " SyntaxError");9 shouldThrow("ctx.strokeText('moo',0)", " SyntaxError");7 shouldThrow("ctx.strokeText()", "NotEnoughArguments"); 8 shouldThrow("ctx.strokeText('moo')", "NotEnoughArguments"); 9 shouldThrow("ctx.strokeText('moo',0)", "NotEnoughArguments"); 10 10 shouldBe("ctx.strokeText('moo',0,0)", "undefined"); 11 11 shouldBe("ctx.strokeText('moo',0,0,0)", "undefined"); -
trunk/LayoutTests/fast/canvas/webgl/data-view-test-expected.txt
r78738 r89315 302 302 PASS view.getInt8() threw exception SyntaxError: Not enough arguments. 303 303 PASS view.getUint8() threw exception SyntaxError: Not enough arguments. 304 PASS view.getInt16() threw exception SyntaxError: Not enough arguments.305 PASS view.getUint16() threw exception SyntaxError: Not enough arguments.306 PASS view.getInt32() threw exception SyntaxError: Not enough arguments.307 PASS view.getUint32() threw exception SyntaxError: Not enough arguments.308 PASS view.getFloat32() threw exception SyntaxError: Not enough arguments.309 PASS view.getFloat64() threw exception SyntaxError: Not enough arguments.304 PASS view.getInt16() threw exception TypeError: Not enough arguments. 305 PASS view.getUint16() threw exception TypeError: Not enough arguments. 306 PASS view.getInt32() threw exception TypeError: Not enough arguments. 307 PASS view.getUint32() threw exception TypeError: Not enough arguments. 308 PASS view.getFloat32() threw exception TypeError: Not enough arguments. 309 PASS view.getFloat64() threw exception TypeError: Not enough arguments. 310 310 311 311 Test for set methods that work … … 792 792 PASS view.setInt8() threw exception SyntaxError: Not enough arguments. 793 793 PASS view.setUint8() threw exception SyntaxError: Not enough arguments. 794 PASS view.setInt16() threw exception SyntaxError: Not enough arguments.795 PASS view.setUint16() threw exception SyntaxError: Not enough arguments.796 PASS view.setInt32() threw exception SyntaxError: Not enough arguments.797 PASS view.setUint32() threw exception SyntaxError: Not enough arguments.798 PASS view.setFloat32() threw exception SyntaxError: Not enough arguments.799 PASS view.setFloat64() threw exception SyntaxError: Not enough arguments.794 PASS view.setInt16() threw exception TypeError: Not enough arguments. 795 PASS view.setUint16() threw exception TypeError: Not enough arguments. 796 PASS view.setInt32() threw exception TypeError: Not enough arguments. 797 PASS view.setUint32() threw exception TypeError: Not enough arguments. 798 PASS view.setFloat32() threw exception TypeError: Not enough arguments. 799 PASS view.setFloat64() threw exception TypeError: Not enough arguments. 800 800 PASS view.setInt8(1) threw exception SyntaxError: Not enough arguments. 801 801 PASS view.setUint8(1) threw exception SyntaxError: Not enough arguments. 802 PASS view.setInt16(1) threw exception SyntaxError: Not enough arguments.803 PASS view.setUint16(1) threw exception SyntaxError: Not enough arguments.804 PASS view.setInt32(1) threw exception SyntaxError: Not enough arguments.805 PASS view.setUint32(1) threw exception SyntaxError: Not enough arguments.806 PASS view.setFloat32(1) threw exception SyntaxError: Not enough arguments.807 PASS view.setFloat64(1) threw exception SyntaxError: Not enough arguments.802 PASS view.setInt16(1) threw exception TypeError: Not enough arguments. 803 PASS view.setUint16(1) threw exception TypeError: Not enough arguments. 804 PASS view.setInt32(1) threw exception TypeError: Not enough arguments. 805 PASS view.setUint32(1) threw exception TypeError: Not enough arguments. 806 PASS view.setFloat32(1) threw exception TypeError: Not enough arguments. 807 PASS view.setFloat64(1) threw exception TypeError: Not enough arguments. 808 808 809 809 Test for indexing that should not work -
trunk/LayoutTests/http/tests/xmlhttprequest/exceptions-expected.txt
r33990 r89315 5 5 PASS: req.send(null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11. 6 6 open() 7 PASS: req.setRequestHeader() threw exception SyntaxError: Not enough arguments.8 PASS: req.setRequestHeader("Foo") threw exception SyntaxError: Not enough arguments.7 PASS: req.setRequestHeader() threw exception TypeError: Not enough arguments. 8 PASS: req.setRequestHeader("Foo") threw exception TypeError: Not enough arguments. 9 9 PASS: req.status() threw exception Error: INVALID_STATE_ERR: DOM Exception 11. 10 10 PASS: req.statusText() threw exception Error: INVALID_STATE_ERR: DOM Exception 11. … … 12 12 PASS: req.send(null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11. 13 13 PASS: req.setRequestHeader("Foo", "bar") threw exception Error: INVALID_STATE_ERR: DOM Exception 11. 14 PASS: req.getResponseHeader() threw exception SyntaxError: Not enough arguments.14 PASS: req.getResponseHeader() threw exception TypeError: Not enough arguments. -
trunk/LayoutTests/platform/chromium-mac/svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt
r77135 r89315 4 4 5 5 6 PASS path.pathSegList.initialize(); threw exception SyntaxError: Not enough arguments.6 PASS path.pathSegList.initialize(); threw exception TypeError: Not enough arguments. 7 7 PASS path.getPathSegAtLength(0) is 0 8 8 PASS path.insertItemBefore(null, 0) threw exception TypeError: Object #<SVGPathElement> has no method 'insertItemBefore'. -
trunk/LayoutTests/platform/chromium-win/svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt
r77135 r89315 4 4 5 5 6 PASS path.pathSegList.initialize(); threw exception SyntaxError: Not enough arguments.6 PASS path.pathSegList.initialize(); threw exception TypeError: Not enough arguments. 7 7 PASS path.getPathSegAtLength(0) is 0 8 8 PASS path.insertItemBefore(null, 0) threw exception TypeError: Object #<SVGPathElement> has no method 'insertItemBefore'. -
trunk/LayoutTests/svg/dom/SVGAngle-expected.txt
r72123 r89315 18 18 PASS angle.convertToSpecifiedUnits(angle) threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9. 19 19 PASS angle.convertToSpecifiedUnits(svgElement) threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9. 20 PASS angle.convertToSpecifiedUnits() threw exception SyntaxError: Not enough arguments.20 PASS angle.convertToSpecifiedUnits() threw exception TypeError: Not enough arguments. 21 21 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED 22 22 … … 47 47 PASS angle.newValueSpecifiedUnits(-1, 50) threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9. 48 48 PASS angle.newValueSpecifiedUnits(5, 50) threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9. 49 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG) threw exception SyntaxError: Not enough arguments.49 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG) threw exception TypeError: Not enough arguments. 50 50 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG, 'aString') is undefined. 51 51 PASS angle.value is NaN … … 55 55 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG, svgElement) is undefined. 56 56 PASS angle.value is NaN 57 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG) threw exception SyntaxError: Not enough arguments.57 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG) threw exception TypeError: Not enough arguments. 58 58 PASS angle.newValueSpecifiedUnits('aString', 4) threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9. 59 59 PASS angle.newValueSpecifiedUnits(angle, 4) threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9. … … 62 62 PASS angle.newValueSpecifiedUnits(angle, angle) threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9. 63 63 PASS angle.newValueSpecifiedUnits(svgElement, svgElement) threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9. 64 PASS angle.newValueSpecifiedUnits() threw exception SyntaxError: Not enough arguments.64 PASS angle.newValueSpecifiedUnits() threw exception TypeError: Not enough arguments. 65 65 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_DEG 66 66 -
trunk/LayoutTests/svg/dom/SVGColor-expected.txt
r79985 r89315 20 20 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_RGBCOLOR, '', '') threw exception Error: SVG_INVALID_VALUE_ERR: DOM SVG Exception 1. 21 21 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_CURRENTCOLOR + 1, '', ''); threw exception Error: SVG_WRONG_TYPE_ERR: DOM SVG Exception 0. 22 PASS stopColor.setColor() threw exception SyntaxError: Not enough arguments.23 PASS stopColor.setColor(stopColor) threw exception SyntaxError: Not enough arguments.22 PASS stopColor.setColor() threw exception TypeError: Not enough arguments. 23 PASS stopColor.setColor(stopColor) threw exception TypeError: Not enough arguments. 24 24 25 25 Try assigning to the readonly colorType property, which silently fails -
trunk/LayoutTests/svg/dom/SVGLength-expected.txt
r72123 r89315 42 42 PASS length.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX, svgElement) is undefined. 43 43 PASS length.value is NaN 44 PASS length.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX) threw exception SyntaxError: Not enough arguments.44 PASS length.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX) threw exception TypeError: Not enough arguments. 45 45 PASS length.newValueSpecifiedUnits('aString', 4) threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9. 46 46 PASS length.newValueSpecifiedUnits(length, 4) threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9. -
trunk/LayoutTests/svg/dom/SVGLengthList-basics-expected.txt
r72518 r89315 25 25 26 26 Test uncommon arguments for insertItemBefore() 27 PASS text1.x.baseVal.insertItemBefore(30) threw exception SyntaxError: Not enough arguments.28 PASS text1.x.baseVal.insertItemBefore('aString') threw exception SyntaxError: Not enough arguments.29 PASS text1.x.baseVal.insertItemBefore(text1) threw exception SyntaxError: Not enough arguments.30 PASS text1.x.baseVal.insertItemBefore(null) threw exception SyntaxError: Not enough arguments.27 PASS text1.x.baseVal.insertItemBefore(30) threw exception TypeError: Not enough arguments. 28 PASS text1.x.baseVal.insertItemBefore('aString') threw exception TypeError: Not enough arguments. 29 PASS text1.x.baseVal.insertItemBefore(text1) threw exception TypeError: Not enough arguments. 30 PASS text1.x.baseVal.insertItemBefore(null) threw exception TypeError: Not enough arguments. 31 31 PASS text1.x.baseVal.insertItemBefore(text1.x.baseVal.getItem(1), 'aString') is text1.x.baseVal.getItem(0) 32 32 PASS text1.x.baseVal.numberOfItems is 3 … … 68 68 69 69 Test uncommon arguments for replaceItem() 70 PASS text1.x.baseVal.replaceItem(30) threw exception SyntaxError: Not enough arguments.71 PASS text1.x.baseVal.replaceItem('aString') threw exception SyntaxError: Not enough arguments.72 PASS text1.x.baseVal.replaceItem(text1) threw exception SyntaxError: Not enough arguments.73 PASS text1.x.baseVal.replaceItem(null) threw exception SyntaxError: Not enough arguments.70 PASS text1.x.baseVal.replaceItem(30) threw exception TypeError: Not enough arguments. 71 PASS text1.x.baseVal.replaceItem('aString') threw exception TypeError: Not enough arguments. 72 PASS text1.x.baseVal.replaceItem(text1) threw exception TypeError: Not enough arguments. 73 PASS text1.x.baseVal.replaceItem(null) threw exception TypeError: Not enough arguments. 74 74 PASS text1.x.baseVal.replaceItem(30, 0) threw exception TypeError: Type error. 75 75 PASS text1.x.baseVal.replaceItem('aString', 0) threw exception TypeError: Type error. -
trunk/LayoutTests/svg/dom/SVGMatrix-expected.txt
r72123 r89315 91 91 92 92 Check calling 'multiply' with invalid arguments 93 PASS matrix.multiply() threw exception SyntaxError: Not enough arguments.93 PASS matrix.multiply() threw exception TypeError: Not enough arguments. 94 94 PASS matrix.multiply(true) threw exception TypeError: Type error. 95 95 PASS matrix.multiply(2) threw exception TypeError: Type error. … … 98 98 99 99 Check calling 'translate' with invalid arguments 100 PASS matrix.translate() threw exception SyntaxError: Not enough arguments.101 PASS matrix.translate(true) threw exception SyntaxError: Not enough arguments.102 PASS matrix.translate(2) threw exception SyntaxError: Not enough arguments.103 PASS matrix.translate('aString') threw exception SyntaxError: Not enough arguments.104 PASS matrix.translate(svgElement) threw exception SyntaxError: Not enough arguments.100 PASS matrix.translate() threw exception TypeError: Not enough arguments. 101 PASS matrix.translate(true) threw exception TypeError: Not enough arguments. 102 PASS matrix.translate(2) threw exception TypeError: Not enough arguments. 103 PASS matrix.translate('aString') threw exception TypeError: Not enough arguments. 104 PASS matrix.translate(svgElement) threw exception TypeError: Not enough arguments. 105 105 PASS matrix.translate('aString', 'aString') is non-null. 106 106 PASS matrix.translate(svgElement, svgElement) is non-null. … … 111 111 112 112 Check calling 'scale' with invalid arguments 113 PASS matrix.scale() threw exception SyntaxError: Not enough arguments.113 PASS matrix.scale() threw exception TypeError: Not enough arguments. 114 114 PASS matrix.scale('aString') is non-null. 115 115 PASS matrix.scale(svgElement) is non-null. 116 116 117 117 Check calling 'scaleNonUniform' with invalid arguments 118 PASS matrix.scaleNonUniform() threw exception SyntaxError: Not enough arguments.119 PASS matrix.scaleNonUniform(true) threw exception SyntaxError: Not enough arguments.120 PASS matrix.scaleNonUniform(2) threw exception SyntaxError: Not enough arguments.121 PASS matrix.scaleNonUniform('aString') threw exception SyntaxError: Not enough arguments.122 PASS matrix.scaleNonUniform(svgElement) threw exception SyntaxError: Not enough arguments.118 PASS matrix.scaleNonUniform() threw exception TypeError: Not enough arguments. 119 PASS matrix.scaleNonUniform(true) threw exception TypeError: Not enough arguments. 120 PASS matrix.scaleNonUniform(2) threw exception TypeError: Not enough arguments. 121 PASS matrix.scaleNonUniform('aString') threw exception TypeError: Not enough arguments. 122 PASS matrix.scaleNonUniform(svgElement) threw exception TypeError: Not enough arguments. 123 123 PASS matrix.scaleNonUniform('aString', 'aString') is non-null. 124 124 PASS matrix.scaleNonUniform(svgElement, svgElement) is non-null. … … 129 129 130 130 Check calling 'rotate' with invalid arguments 131 PASS matrix.rotate() threw exception SyntaxError: Not enough arguments.131 PASS matrix.rotate() threw exception TypeError: Not enough arguments. 132 132 PASS matrix.rotate('aString') is non-null. 133 133 PASS matrix.rotate(svgElement) is non-null. 134 134 135 135 Check calling 'rotateFromVector' with invalid arguments 136 PASS matrix.rotateFromVector() threw exception SyntaxError: Not enough arguments.137 PASS matrix.rotateFromVector(true) threw exception SyntaxError: Not enough arguments.138 PASS matrix.rotateFromVector(2) threw exception SyntaxError: Not enough arguments.139 PASS matrix.rotateFromVector('aString') threw exception SyntaxError: Not enough arguments.140 PASS matrix.rotateFromVector(svgElement) threw exception SyntaxError: Not enough arguments.136 PASS matrix.rotateFromVector() threw exception TypeError: Not enough arguments. 137 PASS matrix.rotateFromVector(true) threw exception TypeError: Not enough arguments. 138 PASS matrix.rotateFromVector(2) threw exception TypeError: Not enough arguments. 139 PASS matrix.rotateFromVector('aString') threw exception TypeError: Not enough arguments. 140 PASS matrix.rotateFromVector(svgElement) threw exception TypeError: Not enough arguments. 141 141 PASS matrix.rotateFromVector('aString', 'aString') is non-null. 142 142 PASS matrix.rotateFromVector(svgElement, svgElement) is non-null. … … 147 147 148 148 Check calling 'skewX' with invalid arguments 149 PASS matrix.skewX() threw exception SyntaxError: Not enough arguments.149 PASS matrix.skewX() threw exception TypeError: Not enough arguments. 150 150 PASS matrix.skewX('aString') is non-null. 151 151 PASS matrix.skewX(svgElement) is non-null. 152 152 153 153 Check calling 'skewY' with invalid arguments 154 PASS matrix.skewY() threw exception SyntaxError: Not enough arguments.154 PASS matrix.skewY() threw exception TypeError: Not enough arguments. 155 155 PASS matrix.skewY('aString') is non-null. 156 156 PASS matrix.skewY(svgElement) is non-null. -
trunk/LayoutTests/svg/dom/SVGNumberList-basics-expected.txt
r72518 r89315 22 22 23 23 Test uncommon arguments for insertItemBefore() 24 PASS text1.rotate.baseVal.insertItemBefore(30) threw exception SyntaxError: Not enough arguments.25 PASS text1.rotate.baseVal.insertItemBefore('aString') threw exception SyntaxError: Not enough arguments.26 PASS text1.rotate.baseVal.insertItemBefore(text1) threw exception SyntaxError: Not enough arguments.27 PASS text1.rotate.baseVal.insertItemBefore(null) threw exception SyntaxError: Not enough arguments.24 PASS text1.rotate.baseVal.insertItemBefore(30) threw exception TypeError: Not enough arguments. 25 PASS text1.rotate.baseVal.insertItemBefore('aString') threw exception TypeError: Not enough arguments. 26 PASS text1.rotate.baseVal.insertItemBefore(text1) threw exception TypeError: Not enough arguments. 27 PASS text1.rotate.baseVal.insertItemBefore(null) threw exception TypeError: Not enough arguments. 28 28 PASS text1.rotate.baseVal.insertItemBefore(text1.rotate.baseVal.getItem(1), 'aString') is text1.rotate.baseVal.getItem(0) 29 29 PASS text1.rotate.baseVal.numberOfItems is 3 … … 65 65 66 66 Test uncommon arguments for replaceItem() 67 PASS text1.rotate.baseVal.replaceItem(30) threw exception SyntaxError: Not enough arguments.68 PASS text1.rotate.baseVal.replaceItem('aString') threw exception SyntaxError: Not enough arguments.69 PASS text1.rotate.baseVal.replaceItem(text1) threw exception SyntaxError: Not enough arguments.70 PASS text1.rotate.baseVal.replaceItem(null) threw exception SyntaxError: Not enough arguments.67 PASS text1.rotate.baseVal.replaceItem(30) threw exception TypeError: Not enough arguments. 68 PASS text1.rotate.baseVal.replaceItem('aString') threw exception TypeError: Not enough arguments. 69 PASS text1.rotate.baseVal.replaceItem(text1) threw exception TypeError: Not enough arguments. 70 PASS text1.rotate.baseVal.replaceItem(null) threw exception TypeError: Not enough arguments. 71 71 PASS text1.rotate.baseVal.replaceItem(30, 0) threw exception TypeError: Type error. 72 72 PASS text1.rotate.baseVal.replaceItem('aString', 0) threw exception TypeError: Type error. -
trunk/LayoutTests/svg/dom/SVGPaint-expected.txt
r79985 r89315 20 20 PASS fillPaint.setPaint(null, null, null, null) threw exception Error: SVG_INVALID_VALUE_ERR: DOM SVG Exception 1. 21 21 PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_RGBCOLOR, svgElement, '', ''); threw exception Error: SVG_INVALID_VALUE_ERR: DOM SVG Exception 1. 22 PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_RGBCOLOR, '', '') threw exception SyntaxError: Not enough arguments.22 PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_RGBCOLOR, '', '') threw exception TypeError: Not enough arguments. 23 23 PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR + 1, '', '', ''); threw exception Error: SVG_WRONG_TYPE_ERR: DOM SVG Exception 0. 24 24 PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_NONE - 1, '', '', ''); threw exception Error: SVG_WRONG_TYPE_ERR: DOM SVG Exception 0. 25 25 PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_URI + 1, '', '', ''); threw exception Error: SVG_WRONG_TYPE_ERR: DOM SVG Exception 0. 26 PASS fillPaint.setPaint() threw exception SyntaxError: Not enough arguments.27 PASS fillPaint.setPaint(fillPaint) threw exception SyntaxError: Not enough arguments.26 PASS fillPaint.setPaint() threw exception TypeError: Not enough arguments. 27 PASS fillPaint.setPaint(fillPaint) threw exception TypeError: Not enough arguments. 28 28 29 29 Try invalid arguments for setUri() 30 PASS fillPaint.setUri() threw exception SyntaxError: Not enough arguments.30 PASS fillPaint.setUri() threw exception TypeError: Not enough arguments. 31 31 32 32 Try assigning to the readonly paintType property, which silently fails -
trunk/LayoutTests/svg/dom/SVGPoint-expected.txt
r72123 r89315 29 29 30 30 Check invalid arguments for 'matrixTransform' 31 PASS point.matrixTransform() threw exception SyntaxError: Not enough arguments.31 PASS point.matrixTransform() threw exception TypeError: Not enough arguments. 32 32 PASS point.matrixTransform(-1) threw exception TypeError: Type error. 33 33 PASS point.matrixTransform(5) threw exception TypeError: Type error. -
trunk/LayoutTests/svg/dom/SVGPointList-basics-expected.txt
r72518 r89315 41 41 42 42 Test uncommon arguments for insertItemBefore() 43 PASS poly1.points.insertItemBefore(30) threw exception SyntaxError: Not enough arguments.44 PASS poly1.points.insertItemBefore('aString') threw exception SyntaxError: Not enough arguments.45 PASS poly1.points.insertItemBefore(poly1) threw exception SyntaxError: Not enough arguments.46 PASS poly1.points.insertItemBefore(null) threw exception SyntaxError: Not enough arguments.43 PASS poly1.points.insertItemBefore(30) threw exception TypeError: Not enough arguments. 44 PASS poly1.points.insertItemBefore('aString') threw exception TypeError: Not enough arguments. 45 PASS poly1.points.insertItemBefore(poly1) threw exception TypeError: Not enough arguments. 46 PASS poly1.points.insertItemBefore(null) threw exception TypeError: Not enough arguments. 47 47 PASS dumpPoint(poly1.points.insertItemBefore(poly1.points.getItem(1), 'aString')) is "x=100 y=0" 48 48 PASS poly1.points.numberOfItems is 4 … … 78 78 79 79 Test uncommon arguments for replaceItem() 80 PASS poly1.points.replaceItem(30) threw exception SyntaxError: Not enough arguments.81 PASS poly1.points.replaceItem('aString') threw exception SyntaxError: Not enough arguments.82 PASS poly1.points.replaceItem(poly1) threw exception SyntaxError: Not enough arguments.80 PASS poly1.points.replaceItem(30) threw exception TypeError: Not enough arguments. 81 PASS poly1.points.replaceItem('aString') threw exception TypeError: Not enough arguments. 82 PASS poly1.points.replaceItem(poly1) threw exception TypeError: Not enough arguments. 83 83 PASS poly1.points.replaceItem(null, 0) threw exception Error: SVG_WRONG_TYPE_ERR: DOM SVG Exception 0. 84 84 PASS poly1.points.replaceItem('aString', 0) threw exception TypeError: Type error. -
trunk/LayoutTests/svg/dom/SVGStringList-basics-expected.txt
r72518 r89315 32 32 33 33 Test uncommon arguments for insertItemBefore() 34 PASS text1.requiredFeatures.insertItemBefore(30) threw exception SyntaxError: Not enough arguments.35 PASS text1.requiredFeatures.insertItemBefore('aString') threw exception SyntaxError: Not enough arguments.36 PASS text1.requiredFeatures.insertItemBefore(text1) threw exception SyntaxError: Not enough arguments.37 PASS text1.requiredFeatures.insertItemBefore(null) threw exception SyntaxError: Not enough arguments.34 PASS text1.requiredFeatures.insertItemBefore(30) threw exception TypeError: Not enough arguments. 35 PASS text1.requiredFeatures.insertItemBefore('aString') threw exception TypeError: Not enough arguments. 36 PASS text1.requiredFeatures.insertItemBefore(text1) threw exception TypeError: Not enough arguments. 37 PASS text1.requiredFeatures.insertItemBefore(null) threw exception TypeError: Not enough arguments. 38 38 PASS text1.requiredFeatures.insertItemBefore(text1.requiredFeatures.getItem(1), 'aString') threw exception Error: INDEX_SIZE_ERR: DOM Exception 1. 39 39 PASS text1.requiredFeatures.insertItemBefore(text1.requiredFeatures.getItem(1), text1) threw exception Error: INDEX_SIZE_ERR: DOM Exception 1. … … 77 77 78 78 Test uncommon arguments for replaceItem() - part 1 79 PASS text1.requiredFeatures.replaceItem(30) threw exception SyntaxError: Not enough arguments.80 PASS text1.requiredFeatures.replaceItem('aString') threw exception SyntaxError: Not enough arguments.81 PASS text1.requiredFeatures.replaceItem(text1) threw exception SyntaxError: Not enough arguments.79 PASS text1.requiredFeatures.replaceItem(30) threw exception TypeError: Not enough arguments. 80 PASS text1.requiredFeatures.replaceItem('aString') threw exception TypeError: Not enough arguments. 81 PASS text1.requiredFeatures.replaceItem(text1) threw exception TypeError: Not enough arguments. 82 82 PASS text1.requiredFeatures.replaceItem(null, 0) is "null" 83 83 PASS text1.requiredFeatures.numberOfItems is 4 -
trunk/LayoutTests/svg/dom/SVGTransform-expected.txt
r72123 r89315 50 50 51 51 Check passing invalid arguments to 'setMatrix' 52 PASS transform.setMatrix() threw exception SyntaxError: Not enough arguments.52 PASS transform.setMatrix() threw exception TypeError: Not enough arguments. 53 53 PASS transform.setMatrix(transform) threw exception TypeError: Type error. 54 54 PASS transform.setMatrix(svgElement) threw exception TypeError: Type error. … … 58 58 59 59 Check passing invalid arguments to 'setTranslate' 60 PASS transform.setTranslate() threw exception SyntaxError: Not enough arguments.61 PASS transform.setTranslate(transform) threw exception SyntaxError: Not enough arguments.62 PASS transform.setTranslate(svgElement) threw exception SyntaxError: Not enough arguments.63 PASS transform.setTranslate('aString') threw exception SyntaxError: Not enough arguments.60 PASS transform.setTranslate() threw exception TypeError: Not enough arguments. 61 PASS transform.setTranslate(transform) threw exception TypeError: Not enough arguments. 62 PASS transform.setTranslate(svgElement) threw exception TypeError: Not enough arguments. 63 PASS transform.setTranslate('aString') threw exception TypeError: Not enough arguments. 64 64 PASS transform.setTranslate(1, transform) is undefined. 65 65 PASS transform.setTranslate(1, svgElement) is undefined. … … 73 73 74 74 Check passing invalid arguments to 'setScale' 75 PASS transform.setScale() threw exception SyntaxError: Not enough arguments.76 PASS transform.setScale(transform) threw exception SyntaxError: Not enough arguments.77 PASS transform.setScale(svgElement) threw exception SyntaxError: Not enough arguments.78 PASS transform.setScale('aString') threw exception SyntaxError: Not enough arguments.75 PASS transform.setScale() threw exception TypeError: Not enough arguments. 76 PASS transform.setScale(transform) threw exception TypeError: Not enough arguments. 77 PASS transform.setScale(svgElement) threw exception TypeError: Not enough arguments. 78 PASS transform.setScale('aString') threw exception TypeError: Not enough arguments. 79 79 PASS transform.setScale(1, transform) is undefined. 80 80 PASS transform.setScale(1, svgElement) is undefined. … … 88 88 89 89 Check passing invalid arguments to 'setRotate' 90 PASS transform.setRotate() threw exception SyntaxError: Not enough arguments.91 PASS transform.setRotate(transform) threw exception SyntaxError: Not enough arguments.92 PASS transform.setRotate(svgElement) threw exception SyntaxError: Not enough arguments.93 PASS transform.setRotate('aString') threw exception SyntaxError: Not enough arguments.94 PASS transform.setRotate(1, transform) threw exception SyntaxError: Not enough arguments.95 PASS transform.setRotate(1, svgElement) threw exception SyntaxError: Not enough arguments.96 PASS transform.setRotate(1, 'aString') threw exception SyntaxError: Not enough arguments.90 PASS transform.setRotate() threw exception TypeError: Not enough arguments. 91 PASS transform.setRotate(transform) threw exception TypeError: Not enough arguments. 92 PASS transform.setRotate(svgElement) threw exception TypeError: Not enough arguments. 93 PASS transform.setRotate('aString') threw exception TypeError: Not enough arguments. 94 PASS transform.setRotate(1, transform) threw exception TypeError: Not enough arguments. 95 PASS transform.setRotate(1, svgElement) threw exception TypeError: Not enough arguments. 96 PASS transform.setRotate(1, 'aString') threw exception TypeError: Not enough arguments. 97 97 PASS transform.setRotate(1, 1, transform) is undefined. 98 98 PASS transform.setRotate(1, 1, svgElement) is undefined. … … 100 100 101 101 Check passing invalid arguments to 'setSkewX' 102 PASS transform.setSkewX() threw exception SyntaxError: Not enough arguments.102 PASS transform.setSkewX() threw exception TypeError: Not enough arguments. 103 103 PASS transform.setSkewX(transform) is undefined. 104 104 PASS transform.setSkewX(svgElement) is undefined. … … 106 106 107 107 Check passing invalid arguments to 'setSkewY' 108 PASS transform.setSkewY() threw exception SyntaxError: Not enough arguments.108 PASS transform.setSkewY() threw exception TypeError: Not enough arguments. 109 109 PASS transform.setSkewY(transform) is undefined. 110 110 PASS transform.setSkewY(svgElement) is undefined. -
trunk/LayoutTests/svg/dom/SVGTransformList-basics-expected.txt
r72518 r89315 23 23 24 24 Test uncommon arguments for insertItemBefore() 25 PASS circle1.transform.baseVal.insertItemBefore(30) threw exception SyntaxError: Not enough arguments.26 PASS circle1.transform.baseVal.insertItemBefore('aString') threw exception SyntaxError: Not enough arguments.27 PASS circle1.transform.baseVal.insertItemBefore(circle1) threw exception SyntaxError: Not enough arguments.28 PASS circle1.transform.baseVal.insertItemBefore(null) threw exception SyntaxError: Not enough arguments.25 PASS circle1.transform.baseVal.insertItemBefore(30) threw exception TypeError: Not enough arguments. 26 PASS circle1.transform.baseVal.insertItemBefore('aString') threw exception TypeError: Not enough arguments. 27 PASS circle1.transform.baseVal.insertItemBefore(circle1) threw exception TypeError: Not enough arguments. 28 PASS circle1.transform.baseVal.insertItemBefore(null) threw exception TypeError: Not enough arguments. 29 29 PASS circle1.transform.baseVal.insertItemBefore(circle1.transform.baseVal.getItem(1), 'aString') is circle1.transform.baseVal.getItem(0) 30 30 PASS circle1.transform.baseVal.numberOfItems is 2 … … 62 62 63 63 Test uncommon arguments for replaceItem() 64 PASS circle1.transform.baseVal.replaceItem(30) threw exception SyntaxError: Not enough arguments.65 PASS circle1.transform.baseVal.replaceItem('aString') threw exception SyntaxError: Not enough arguments.66 PASS circle1.transform.baseVal.replaceItem(circle1) threw exception SyntaxError: Not enough arguments.67 PASS circle1.transform.baseVal.replaceItem(null) threw exception SyntaxError: Not enough arguments.64 PASS circle1.transform.baseVal.replaceItem(30) threw exception TypeError: Not enough arguments. 65 PASS circle1.transform.baseVal.replaceItem('aString') threw exception TypeError: Not enough arguments. 66 PASS circle1.transform.baseVal.replaceItem(circle1) threw exception TypeError: Not enough arguments. 67 PASS circle1.transform.baseVal.replaceItem(null) threw exception TypeError: Not enough arguments. 68 68 PASS circle1.transform.baseVal.replaceItem(30, 0) threw exception TypeError: Type error. 69 69 PASS circle1.transform.baseVal.replaceItem('aString', 0) threw exception TypeError: Type error. -
trunk/LayoutTests/svg/dom/SVGTransformList-expected.txt
r73345 r89315 6 6 7 7 Check passing invalid arguments to 'createSVGTransformFromMatrix' 8 PASS transform.createSVGTransformFromMatrix() threw exception SyntaxError: Not enough arguments.8 PASS transform.createSVGTransformFromMatrix() threw exception TypeError: Not enough arguments. 9 9 PASS transform.createSVGTransformFromMatrix(svgElement.createSVGTransform()) threw exception TypeError: Type error. 10 10 PASS transform.createSVGTransformFromMatrix(svgElement) threw exception TypeError: Type error. -
trunk/LayoutTests/svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt
r72381 r89315 4 4 5 5 6 PASS path.pathSegList.initialize(); threw exception SyntaxError: Not enough arguments.6 PASS path.pathSegList.initialize(); threw exception TypeError: Not enough arguments. 7 7 PASS path.getPathSegAtLength(0) is 0 8 8 PASS path.insertItemBefore(null, 0) threw exception TypeError: 'undefined' is not a function (evaluating 'path.insertItemBefore(null, 0)'). -
trunk/Source/WebCore/ChangeLog
r89314 r89315 1 2011-06-20 Mark Pilgrim <pilgrim@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 IDL generator should throw TypeError instead of SyntaxError on not enough arguments 6 https://bugs.webkit.org/show_bug.cgi?id=63011 7 8 To align with WebIDL, we should throw TypeError whenever a function 9 is called with missing required arguments. 10 11 * bindings/scripts/CodeGeneratorJS.pm: 12 * bindings/scripts/CodeGeneratorV8.pm: 13 * bindings/scripts/test/V8/V8TestObj.cpp: 14 (WebCore::TestObjInternal::methodThatRequiresAllArgsAndThrowsCallback): 15 1 16 2011-05-03 Martin Robinson <mrobinson@igalia.com> 2 17 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r89269 r89315 1949 1949 push(@implContent, " if (exec->argumentCount() < $numMandatoryParams)\n"); 1950 1950 if ($requiresAllArguments eq "Raise") { 1951 push(@implContent, " return throwVMError(exec, create SyntaxError(exec, \"Not enough arguments\"));\n");1951 push(@implContent, " return throwVMError(exec, createTypeError(exec, \"Not enough arguments\"));\n"); 1952 1952 } else { 1953 1953 push(@implContent, " return JSValue::encode(jsUndefined());\n"); -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
r89261 r89315 1260 1260 push(@implContentDecls, " if (args.Length() < $numMandatoryParams)\n"); 1261 1261 if ($requiresAllArguments eq "Raise") { 1262 push(@implContentDecls, " return throwError(\"Not enough arguments\", V8Proxy:: SyntaxError);\n");1262 push(@implContentDecls, " return throwError(\"Not enough arguments\", V8Proxy::TypeError);\n"); 1263 1263 } else { 1264 1264 push(@implContentDecls, " return v8::Handle<v8::Value>();\n"); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r89267 r89315 1037 1037 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 1038 1038 if (exec->argumentCount() < 2) 1039 return throwVMError(exec, create SyntaxError(exec, "Not enough arguments"));1039 return throwVMError(exec, createTypeError(exec, "Not enough arguments")); 1040 1040 ExceptionCode ec = 0; 1041 1041 const String& strArg(ustringToString(exec->argument(0).toString(exec))); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
r89267 r89315 699 699 INC_STATS("DOM.TestObj.methodThatRequiresAllArgsAndThrows"); 700 700 if (args.Length() < 2) 701 return throwError("Not enough arguments", V8Proxy:: SyntaxError);701 return throwError("Not enough arguments", V8Proxy::TypeError); 702 702 TestObj* imp = V8TestObj::toNative(args.Holder()); 703 703 ExceptionCode ec = 0;
Note: See TracChangeset
for help on using the changeset viewer.