The EcmaScript spec (http://ecma-international.org/ecma-262/5.1/#sec-15.3.4.2 - text is the same for version 5) states that the result of Function#toString is the content of a function declaration, even if whitespace etc. can vary.  And we're allowed to expect version 5 for our testing purposes, right?   By testing that the actual text of the function was what was expected - not just, for instance, the result of running the function - we caught how the number of parameters for the onerror function differs from the spec at times, too.  Should we really drop these tests, or might there be another approach you would prefer, if we shouldn't rely this heavily on the EcmaScript spec?