Thanks to a patch from greid, fix case where "" is passed into getParameters,

which would previously have weird behavior. (Pullup #3408)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@12217 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2011-08-08 13:43:14 +00:00
parent 51efcde523
commit 533f8625d9
2 changed files with 13 additions and 3 deletions
+10 -1
View File
@@ -952,7 +952,16 @@
}
function test_Util_getParameters(t) {
t.plan(17);
t.plan(20);
t.eq(OpenLayers.Util.getParameters(''), {},
"getParameters works when the given argument is empty string");
t.eq(OpenLayers.Util.getParameters(), {},
"getParameters works with optional argument");
t.eq(OpenLayers.Util.getParameters(null), {},
"getParameters works with optional argument");
t.eq(OpenLayers.Util.getParameters('http://www.example.com'), {},
"getParameters works when args = ''");