haikuwebkit/LayoutTests/svg/dom/svgpath-out-of-bounds-getPa...

20 lines
1.4 KiB
Plaintext
Raw Permalink Normal View History

Tests that an exception is thrown if we try to get a pathSeg for a length out of the bounds of the path itself.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
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): Canonical link: https://commits.webkit.org/78630@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@89315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-06-20 23:54:07 +00:00
PASS path.pathSegList.initialize(); threw exception TypeError: Not enough arguments.
PASS path.getPathSegAtLength(0) is 0
Improve error messages in JSC https://bugs.webkit.org/show_bug.cgi?id=141869 Reviewed by Geoffrey Garen. Source/JavaScriptCore: JavaScriptCore has some unintuitive error messages associated with certain common errors. This patch changes some specific error messages to be more understandable and also creates a mechanism that will allow for easy modification of error messages in the future. The specific errors we change are not a function errors and invalid parameter errors. * CMakeLists.txt: * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: * JavaScriptCore.xcodeproj/project.pbxproj: * interpreter/Interpreter.cpp: (JSC::sizeOfVarargs): * jit/JITOperations.cpp: op_throw_static_error always has a JSString as its argument. There is no need to dance around this, and we should assert that this always holds. This JSString represents the error message we want to display to the user, so there is no need to pass it into errorDescriptionForValue which will now place quotes around the string. * llint/LLIntSlowPaths.cpp: (JSC::LLInt::LLINT_SLOW_PATH_DECL): * runtime/CommonSlowPaths.h: (JSC::CommonSlowPaths::opIn): * runtime/ErrorInstance.cpp: (JSC::ErrorInstance::ErrorInstance): * runtime/ErrorInstance.h: (JSC::ErrorInstance::hasSourceAppender): (JSC::ErrorInstance::sourceAppender): (JSC::ErrorInstance::setSourceAppender): (JSC::ErrorInstance::clearSourceAppender): (JSC::ErrorInstance::setRuntimeTypeForCause): (JSC::ErrorInstance::runtimeTypeForCause): (JSC::ErrorInstance::clearRuntimeTypeForCause): (JSC::ErrorInstance::appendSourceToMessage): Deleted. (JSC::ErrorInstance::setAppendSourceToMessage): Deleted. (JSC::ErrorInstance::clearAppendSourceToMessage): Deleted. * runtime/ExceptionHelpers.cpp: (JSC::errorDescriptionForValue): (JSC::defaultApproximateSourceError): (JSC::defaultSourceAppender): (JSC::functionCallBase): (JSC::notAFunctionSourceAppender): (JSC::invalidParameterInSourceAppender): (JSC::invalidParameterInstanceofSourceAppender): (JSC::createError): (JSC::createInvalidFunctionApplyParameterError): (JSC::createInvalidInParameterError): (JSC::createInvalidInstanceofParameterError): (JSC::createNotAConstructorError): (JSC::createNotAFunctionError): (JSC::createNotAnObjectError): (JSC::createInvalidParameterError): Deleted. * runtime/ExceptionHelpers.h: * runtime/JSObject.cpp: (JSC::JSObject::hasInstance): * runtime/RuntimeType.cpp: Added. (JSC::runtimeTypeForValue): (JSC::runtimeTypeAsString): * runtime/RuntimeType.h: Added. * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/TypeSet.cpp: (JSC::TypeSet::getRuntimeTypeForValue): Deleted. * runtime/TypeSet.h: * runtime/VM.cpp: (JSC::appendSourceToError): (JSC::VM::throwException): LayoutTests: * fast/dom/NodeList/nodelist-item-call-as-function-expected.txt: * fast/dom/call-a-constructor-as-a-function-expected.txt: * fast/regex/dom/cross-frame-callable-expected.txt: * fast/selectors/closest-general-expected.txt: * http/tests/security/xss-DENIED-window-index-assign-expected.txt: * js/dom/exception-thrown-from-new-expected.txt: * js/exception-for-nonobject-expected.txt: * js/exception-function-apply-expected.txt: Added. * js/exception-function-apply.html: Added. * js/exception-in-expected.txt: Added. * js/exception-in.html: Added. * js/exception-instanceof-expected.txt: Added. * js/exception-instanceof.html: Added. * js/instance-of-immediates-expected.txt: * js/script-tests/exception-function-apply.js: Added. * js/script-tests/exception-in.js: Added. * js/script-tests/exception-instanceof.js: Added. * js/typedarray-constructors-expected.txt: * platform/mac-wk2/plugins/npruntime/object-from-destroyed-plugin-expected.txt: * platform/mac-wk2/plugins/npruntime/object-from-destroyed-plugin-in-subframe-expected.txt: * platform/mac/css3/selectors3/xhtml/css3-modsel-15c-expected.txt: * platform/mac/css3/selectors3/xml/css3-modsel-15c-expected.txt: * plugins/npruntime/object-from-destroyed-plugin-expected.txt: * plugins/npruntime/object-from-destroyed-plugin-in-subframe-expected.txt: * plugins/npruntime/plugin-scriptable-object-invoke-default-expected.txt: * sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T1-expected.txt: * sputnik/Conformance/13_Function_Definition/S13_A17_T2-expected.txt: * sputnik/Conformance/15_Native_Objects/15.1_The_Global_Object/S15.1_A2_T1-expected.txt: * sputnik/Conformance/15_Native_Objects/15.2_Object/15.2.4/S15.2.4_A3-expected.txt: * svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt: Canonical link: https://commits.webkit.org/161017@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181889 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-24 07:30:05 +00:00
PASS path.insertItemBefore(null, 0) threw exception TypeError: path.insertItemBefore is not a function. (In 'path.insertItemBefore(null, 0)', 'path.insertItemBefore' is undefined).
PASS path.replaceItem(null, 0) threw exception TypeError: path.replaceItem is not a function. (In 'path.replaceItem(null, 0)', 'path.replaceItem' is undefined).
PASS path.appendItem(null) threw exception TypeError: path.appendItem is not a function. (In 'path.appendItem(null)', 'path.appendItem' is undefined).
List correctly initialised.
PASS path.getPathSegAtLength(0) is 0
Improve error messages in JSC https://bugs.webkit.org/show_bug.cgi?id=141869 Reviewed by Geoffrey Garen. Source/JavaScriptCore: JavaScriptCore has some unintuitive error messages associated with certain common errors. This patch changes some specific error messages to be more understandable and also creates a mechanism that will allow for easy modification of error messages in the future. The specific errors we change are not a function errors and invalid parameter errors. * CMakeLists.txt: * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: * JavaScriptCore.xcodeproj/project.pbxproj: * interpreter/Interpreter.cpp: (JSC::sizeOfVarargs): * jit/JITOperations.cpp: op_throw_static_error always has a JSString as its argument. There is no need to dance around this, and we should assert that this always holds. This JSString represents the error message we want to display to the user, so there is no need to pass it into errorDescriptionForValue which will now place quotes around the string. * llint/LLIntSlowPaths.cpp: (JSC::LLInt::LLINT_SLOW_PATH_DECL): * runtime/CommonSlowPaths.h: (JSC::CommonSlowPaths::opIn): * runtime/ErrorInstance.cpp: (JSC::ErrorInstance::ErrorInstance): * runtime/ErrorInstance.h: (JSC::ErrorInstance::hasSourceAppender): (JSC::ErrorInstance::sourceAppender): (JSC::ErrorInstance::setSourceAppender): (JSC::ErrorInstance::clearSourceAppender): (JSC::ErrorInstance::setRuntimeTypeForCause): (JSC::ErrorInstance::runtimeTypeForCause): (JSC::ErrorInstance::clearRuntimeTypeForCause): (JSC::ErrorInstance::appendSourceToMessage): Deleted. (JSC::ErrorInstance::setAppendSourceToMessage): Deleted. (JSC::ErrorInstance::clearAppendSourceToMessage): Deleted. * runtime/ExceptionHelpers.cpp: (JSC::errorDescriptionForValue): (JSC::defaultApproximateSourceError): (JSC::defaultSourceAppender): (JSC::functionCallBase): (JSC::notAFunctionSourceAppender): (JSC::invalidParameterInSourceAppender): (JSC::invalidParameterInstanceofSourceAppender): (JSC::createError): (JSC::createInvalidFunctionApplyParameterError): (JSC::createInvalidInParameterError): (JSC::createInvalidInstanceofParameterError): (JSC::createNotAConstructorError): (JSC::createNotAFunctionError): (JSC::createNotAnObjectError): (JSC::createInvalidParameterError): Deleted. * runtime/ExceptionHelpers.h: * runtime/JSObject.cpp: (JSC::JSObject::hasInstance): * runtime/RuntimeType.cpp: Added. (JSC::runtimeTypeForValue): (JSC::runtimeTypeAsString): * runtime/RuntimeType.h: Added. * runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): * runtime/TypeSet.cpp: (JSC::TypeSet::getRuntimeTypeForValue): Deleted. * runtime/TypeSet.h: * runtime/VM.cpp: (JSC::appendSourceToError): (JSC::VM::throwException): LayoutTests: * fast/dom/NodeList/nodelist-item-call-as-function-expected.txt: * fast/dom/call-a-constructor-as-a-function-expected.txt: * fast/regex/dom/cross-frame-callable-expected.txt: * fast/selectors/closest-general-expected.txt: * http/tests/security/xss-DENIED-window-index-assign-expected.txt: * js/dom/exception-thrown-from-new-expected.txt: * js/exception-for-nonobject-expected.txt: * js/exception-function-apply-expected.txt: Added. * js/exception-function-apply.html: Added. * js/exception-in-expected.txt: Added. * js/exception-in.html: Added. * js/exception-instanceof-expected.txt: Added. * js/exception-instanceof.html: Added. * js/instance-of-immediates-expected.txt: * js/script-tests/exception-function-apply.js: Added. * js/script-tests/exception-in.js: Added. * js/script-tests/exception-instanceof.js: Added. * js/typedarray-constructors-expected.txt: * platform/mac-wk2/plugins/npruntime/object-from-destroyed-plugin-expected.txt: * platform/mac-wk2/plugins/npruntime/object-from-destroyed-plugin-in-subframe-expected.txt: * platform/mac/css3/selectors3/xhtml/css3-modsel-15c-expected.txt: * platform/mac/css3/selectors3/xml/css3-modsel-15c-expected.txt: * plugins/npruntime/object-from-destroyed-plugin-expected.txt: * plugins/npruntime/object-from-destroyed-plugin-in-subframe-expected.txt: * plugins/npruntime/plugin-scriptable-object-invoke-default-expected.txt: * sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T1-expected.txt: * sputnik/Conformance/13_Function_Definition/S13_A17_T2-expected.txt: * sputnik/Conformance/15_Native_Objects/15.1_The_Global_Object/S15.1_A2_T1-expected.txt: * sputnik/Conformance/15_Native_Objects/15.2_Object/15.2.4/S15.2.4_A3-expected.txt: * svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt: Canonical link: https://commits.webkit.org/161017@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181889 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-24 07:30:05 +00:00
PASS path.insertItemBefore(null, 0) threw exception TypeError: path.insertItemBefore is not a function. (In 'path.insertItemBefore(null, 0)', 'path.insertItemBefore' is undefined).
PASS path.replaceItem(null, 0) threw exception TypeError: path.replaceItem is not a function. (In 'path.replaceItem(null, 0)', 'path.replaceItem' is undefined).
PASS path.appendItem(null) threw exception TypeError: path.appendItem is not a function. (In 'path.appendItem(null)', 'path.appendItem' is undefined).
PASS successfullyParsed is true
TEST COMPLETE