[OpenLayers-Dev] Testing OpenLayers / Test.AnotherWay
Gertjan van Oosten
gertjan at West.NL
Thu Apr 26 09:55:15 EDT 2007
As quoted from Christopher Schmidt <crschmidt at metacarta.com>:
> On Thu, Apr 26, 2007 at 02:36:34PM +0200, Gertjan van Oosten wrote:
> > Does any of you know why OL selected Test.AnotherWay?
>
> It was handy :)
Fair enough. ;-)
> There was no real reason: the three of us sat down, did a quick 'testing
> in javascript' search, and one of us got a test up and running fastest,
> so we went with that one.
OK; do you recall if Selenium was also looked at?
BTW: This test code is scary:
var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
...
if (isMozilla) {
t.ok( objC instanceof A, "obj C isa A" );
...
} else {
t.ok( true, "IE sucks" );
...
}
Cf. http://www.quirksmode.org/js/support.html
And http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:Property_Inheritance_Revisited:Determining_Instance_Relationships
for an instanceOf() function that supposedly works for JavaScript
versions that don't have the instanceof operator.
Kind regards,
--
-- Gertjan van Oosten, gertjan at West.NL, West Consulting B.V., +31 15 2191 600
More information about the Dev
mailing list