archives

« Bugzilla Issues Index

#276 — S15.5.4.13_A3_T3 and S15.5.4.14_A3_T3 and S15.5.4.15_A3_T7 are invalid


Both tests require Function.prototype.toString to return a string starting with the prefix "function". But according to 15.3.4.2 Function.prototype.toString() returns an implementation-dependent representation of a function. And there is the following note:
---
Note in particular that the use and placement of white space, line terminators, and semicolons within the representation String is implementation-dependent.
---

That means the spec clearly allows for an implementation to return a string with leading whitespace before the "function" keyword. S15.5.4.13_A3_T3 and S15.5.4.14_A3_T3 wouldn't pass in this situation since they only expect the prefix "function" without any other leading characters.


Applies to S15.5.4.15_A3_T7 as well


In all three test cases:
var __instance = function(){};

has been changed to:
var __instance = { toString: function() { return "function(){}";} };


Changes have been pushed to Hg, but are not yet on the live website.