2011-06-20 Mark Pilgrim <pilgrim@chromium.org>
Reviewed by Adam Barth.
IDL generator should throw TypeError instead of SyntaxError on not enough arguments
https://bugs.webkit.org/show_bug.cgi?id=63011
To align with WebIDL, we should throw TypeError whenever a function
is called with missing required arguments.
* fast/canvas/canvas-overloads-drawImageFromRect-expected.txt:
* fast/canvas/canvas-overloads-fillText-expected.txt:
* fast/canvas/canvas-overloads-strokeText-expected.txt:
* fast/canvas/script-tests/canvas-overloads-drawImageFromRect.js:
* fast/canvas/script-tests/canvas-overloads-fillText.js:
* fast/canvas/script-tests/canvas-overloads-strokeText.js:
* fast/canvas/webgl/data-view-test-expected.txt:
* http/tests/xmlhttprequest/exceptions-expected.txt:
* platform/chromium-mac/svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt:
* platform/chromium-win/svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt:
* svg/dom/SVGAngle-expected.txt:
* svg/dom/SVGColor-expected.txt:
* svg/dom/SVGLength-expected.txt:
* svg/dom/SVGLengthList-basics-expected.txt:
* svg/dom/SVGMatrix-expected.txt:
* svg/dom/SVGNumberList-basics-expected.txt:
* svg/dom/SVGPaint-expected.txt:
* svg/dom/SVGPoint-expected.txt:
* svg/dom/SVGPointList-basics-expected.txt:
* svg/dom/SVGStringList-basics-expected.txt:
* svg/dom/SVGTransform-expected.txt:
* svg/dom/SVGTransformList-basics-expected.txt:
* svg/dom/SVGTransformList-expected.txt:
* svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt:
2011-06-20 Mark Pilgrim <pilgrim@chromium.org>
Reviewed by Adam Barth.
IDL generator should throw TypeError instead of SyntaxError on not enough arguments
https://bugs.webkit.org/show_bug.cgi?id=63011
To align with WebIDL, we should throw TypeError whenever a function
is called with missing required arguments.
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/CodeGeneratorV8.pm:
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjInternal::methodThatRequiresAllArgsAndThrowsCallback):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@89315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/svg/dom/SVGTransform-expected.txt b/LayoutTests/svg/dom/SVGTransform-expected.txt
index d5c8c5d..c17facb 100644
--- a/LayoutTests/svg/dom/SVGTransform-expected.txt
+++ b/LayoutTests/svg/dom/SVGTransform-expected.txt
@@ -49,7 +49,7 @@
PASS transform.matrix.f is 0
Check passing invalid arguments to 'setMatrix'
-PASS transform.setMatrix() threw exception SyntaxError: Not enough arguments.
+PASS transform.setMatrix() threw exception TypeError: Not enough arguments.
PASS transform.setMatrix(transform) threw exception TypeError: Type error.
PASS transform.setMatrix(svgElement) threw exception TypeError: Type error.
PASS transform.setMatrix('aString') threw exception TypeError: Type error.
@@ -57,10 +57,10 @@
PASS transform.setMatrix(false) threw exception TypeError: Type error.
Check passing invalid arguments to 'setTranslate'
-PASS transform.setTranslate() threw exception SyntaxError: Not enough arguments.
-PASS transform.setTranslate(transform) threw exception SyntaxError: Not enough arguments.
-PASS transform.setTranslate(svgElement) threw exception SyntaxError: Not enough arguments.
-PASS transform.setTranslate('aString') threw exception SyntaxError: Not enough arguments.
+PASS transform.setTranslate() threw exception TypeError: Not enough arguments.
+PASS transform.setTranslate(transform) threw exception TypeError: Not enough arguments.
+PASS transform.setTranslate(svgElement) threw exception TypeError: Not enough arguments.
+PASS transform.setTranslate('aString') threw exception TypeError: Not enough arguments.
PASS transform.setTranslate(1, transform) is undefined.
PASS transform.setTranslate(1, svgElement) is undefined.
PASS transform.setTranslate(1, 'aString') is undefined.
@@ -72,10 +72,10 @@
PASS transform.setTranslate('aString', 'aString') is undefined.
Check passing invalid arguments to 'setScale'
-PASS transform.setScale() threw exception SyntaxError: Not enough arguments.
-PASS transform.setScale(transform) threw exception SyntaxError: Not enough arguments.
-PASS transform.setScale(svgElement) threw exception SyntaxError: Not enough arguments.
-PASS transform.setScale('aString') threw exception SyntaxError: Not enough arguments.
+PASS transform.setScale() threw exception TypeError: Not enough arguments.
+PASS transform.setScale(transform) threw exception TypeError: Not enough arguments.
+PASS transform.setScale(svgElement) threw exception TypeError: Not enough arguments.
+PASS transform.setScale('aString') threw exception TypeError: Not enough arguments.
PASS transform.setScale(1, transform) is undefined.
PASS transform.setScale(1, svgElement) is undefined.
PASS transform.setScale(1, 'aString') is undefined.
@@ -87,25 +87,25 @@
PASS transform.setScale('aString', 'aString') is undefined.
Check passing invalid arguments to 'setRotate'
-PASS transform.setRotate() threw exception SyntaxError: Not enough arguments.
-PASS transform.setRotate(transform) threw exception SyntaxError: Not enough arguments.
-PASS transform.setRotate(svgElement) threw exception SyntaxError: Not enough arguments.
-PASS transform.setRotate('aString') threw exception SyntaxError: Not enough arguments.
-PASS transform.setRotate(1, transform) threw exception SyntaxError: Not enough arguments.
-PASS transform.setRotate(1, svgElement) threw exception SyntaxError: Not enough arguments.
-PASS transform.setRotate(1, 'aString') threw exception SyntaxError: Not enough arguments.
+PASS transform.setRotate() threw exception TypeError: Not enough arguments.
+PASS transform.setRotate(transform) threw exception TypeError: Not enough arguments.
+PASS transform.setRotate(svgElement) threw exception TypeError: Not enough arguments.
+PASS transform.setRotate('aString') threw exception TypeError: Not enough arguments.
+PASS transform.setRotate(1, transform) threw exception TypeError: Not enough arguments.
+PASS transform.setRotate(1, svgElement) threw exception TypeError: Not enough arguments.
+PASS transform.setRotate(1, 'aString') threw exception TypeError: Not enough arguments.
PASS transform.setRotate(1, 1, transform) is undefined.
PASS transform.setRotate(1, 1, svgElement) is undefined.
PASS transform.setRotate(1, 1, 'aString') is undefined.
Check passing invalid arguments to 'setSkewX'
-PASS transform.setSkewX() threw exception SyntaxError: Not enough arguments.
+PASS transform.setSkewX() threw exception TypeError: Not enough arguments.
PASS transform.setSkewX(transform) is undefined.
PASS transform.setSkewX(svgElement) is undefined.
PASS transform.setSkewX('aString') is undefined.
Check passing invalid arguments to 'setSkewY'
-PASS transform.setSkewY() threw exception SyntaxError: Not enough arguments.
+PASS transform.setSkewY() threw exception TypeError: Not enough arguments.
PASS transform.setSkewY(transform) is undefined.
PASS transform.setSkewY(svgElement) is undefined.
PASS transform.setSkewY('aString') is undefined.