Updating the date tests to work against Firefox 6 (and any other implementations that throw RangeError). closes #3461
git-svn-id: http://svn.openlayers.org/trunk/openlayers@12254 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -20,7 +20,15 @@
|
||||
|
||||
// check invalid date
|
||||
date = new Date("foo");
|
||||
str = OpenLayers.Date.toISOString(date);
|
||||
try {
|
||||
str = OpenLayers.Date.toISOString(date);
|
||||
} catch (err) {
|
||||
// some implementations throw RangeError
|
||||
// see https://bugzilla.mozilla.org/show_bug.cgi?id=649575
|
||||
if (err instanceof RangeError) {
|
||||
str = "Invalid Date";
|
||||
}
|
||||
}
|
||||
t.eq(str, "Invalid Date", "invalid date");
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user