Test failures: js1_2/function/tostring-1.js js1_2/function/tostring-2.js These are false positives based on hard-coded results for Function.toString(). Our Function.toString() doesn't match Firefox's, but it doesn't seem worth the work to make it, since ECMA says Function.toString() is implementation dependent, and even the moz test says it is only trying to "verify that the result is something reasonable." ECMA spec says: 15.3.4.2 Func t i o n. pr o t o t y pe . t o St r i ng ( ) An implementation-dependent representation of the function is returned... Note in particular that the use and placement of white space, line terminators, and semicolons within the representation string is implementation-dependent. The one ECMA requirement is: "This representation has the syntax of a FunctionDeclaration."
Created attachment 2937 [details] Patch This patch replaces the mozilla format for Function.toString() in the test suite's expected results with the JavaScriptCore format.
Comment on attachment 2937 [details] Patch This needs a comment at least, explaining why it's changed. Later when we merge our test in with a newer version of the Mozilla tests, we'd like comments to ease the merging. An even better alternative would be to figure out a way to make the test tolerant of the differences in whitespace. We might even consider making our format more similar to the one from Mozilla in cases where we like theirs better.
Created attachment 162603 [details] new fix, added comments, added whitespace insensitive compare
Comment on attachment 162603 [details] new fix, added comments, added whitespace insensitive compare Throwback day.
Fixed in r127797