summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/js/kde/resources
diff options
context:
space:
mode:
authordarin@apple.com <darin@apple.com@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2008-01-27 08:54:25 +0000
committerdarin@apple.com <darin@apple.com@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2008-01-27 08:54:25 +0000
commit89047d2c338de723ae37e2d03fbce2ea2d110bc1 (patch)
tree99125e2ecbdf4c0c53823fcf9723f3905bf6d159 /third_party/WebKit/LayoutTests/fast/js/kde/resources
parent709ebfb03606d7f36a119ec9a1c296d629f5fe33 (diff)
downloadchromium_src-89047d2c338de723ae37e2d03fbce2ea2d110bc1.zip
chromium_src-89047d2c338de723ae37e2d03fbce2ea2d110bc1.tar.gz
chromium_src-89047d2c338de723ae37e2d03fbce2ea2d110bc1.tar.bz2
JavaScriptCore:
Reviewed by Oliver. - fix http://bugs.webkit.org/show_bug.cgi?id=16498 ''.constructor.toString() gives [function] Test: fast/js/function-names.html * kjs/array_object.cpp: (KJS::ArrayObjectImp::ArrayObjectImp): Use the class name as the constructor's function name. * kjs/bool_object.cpp: (KJS::BooleanObjectImp::BooleanObjectImp): Ditto. * kjs/date_object.cpp: (KJS::DateObjectImp::DateObjectImp): Ditto. * kjs/error_object.cpp: (KJS::ErrorPrototype::ErrorPrototype): Make the error object be an Error. (KJS::ErrorObjectImp::ErrorObjectImp): Use the class name as the constructor's function name. (KJS::NativeErrorPrototype::NativeErrorPrototype): Take const UString&. (KJS::NativeErrorImp::NativeErrorImp): Use the prototype's name as the constructor's function name. * kjs/error_object.h: Change ErrorPrototype to inherit from ErrorInstance. Change the NativeErrorImp constructor to take a NativeErrorPrototype pointer for its prototype. * kjs/function.h: Removed unneeded constructor for internal functions without names. We want to avoid those! * kjs/function_object.cpp: (KJS::functionProtoFuncToString): Removed code that writes out just [function] for functions that have no names. There's no reason to do that. (KJS::FunctionObjectImp::FunctionObjectImp): Use the class name as the constructor's function name. * kjs/internal.cpp: Removed the unused constructor. * kjs/number_object.cpp: (KJS::fractionalPartToString): Marked static for internal linkage. (KJS::exponentialPartToString): Ditto. (KJS::numberProtoFuncToPrecision): Removed an unneeded else. (KJS::NumberObjectImp::NumberObjectImp): Use the class name as the constructor's function name. (KJS::NumberObjectImp::getValueProperty): Tweaked formatting. * kjs/object_object.cpp: (KJS::ObjectObjectImp::ObjectObjectImp): Use "Object" for the function name. * kjs/regexp_object.cpp: (KJS::RegExpObjectImp::RegExpObjectImp): Use "RegExp" for the function name. * kjs/string_object.cpp: (KJS::StringObjectImp::StringObjectImp): Use the class name as the constructor's function name. LayoutTests: Reviewed by Oliver. - test for http://bugs.webkit.org/show_bug.cgi?id=16498 ''.constructor.toString() gives [function] * fast/js/function-names-expected.txt: Updated for new tests. * fast/js/kde/resources/function.js: Updated test to expect the format that Gecko uses for native code, which we now match character for character. * fast/js/resources/function-names.js: Added tests for the names of all the constructors. git-svn-id: svn://svn.chromium.org/blink/trunk@29817 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests/fast/js/kde/resources')
-rw-r--r--third_party/WebKit/LayoutTests/fast/js/kde/resources/function.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/js/kde/resources/function.js b/third_party/WebKit/LayoutTests/fast/js/kde/resources/function.js
index 733f4dd..c7c8693 100644
--- a/third_party/WebKit/LayoutTests/fast/js/kde/resources/function.js
+++ b/third_party/WebKit/LayoutTests/fast/js/kde/resources/function.js
@@ -160,7 +160,7 @@ function groupFunc(a, b) { return (a+b)*3; } // check for () being preserved
eval("var groupClone = " + groupFunc);
shouldBe("groupClone(1, 2)", "9");
-var sinStr = '\nfunction sin() {\n [native code]\n}\n'
+var sinStr = 'function sin() {\n [native code]\n}'
shouldBe("String(Math.sin)", "sinStr");
///////////////////////////////