From 89c215bba4ef5217002990d5a65aeedceb9de2df Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Tue, 2 Nov 2010 19:35:02 +0000 Subject: [PATCH] Fixing up the WMS Post tests so they don't override getBrowserName (closes #2912). git-svn-id: http://svn.openlayers.org/trunk/openlayers@10867 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- tests/Layer/WMS/Post.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/Layer/WMS/Post.html b/tests/Layer/WMS/Post.html index f3b04540ad..b82780cdcb 100644 --- a/tests/Layer/WMS/Post.html +++ b/tests/Layer/WMS/Post.html @@ -16,8 +16,8 @@ t.plan( 2 ); var url = "http://octo.metacarta.com/cgi-bin/mapserv"; - var options = { unsupportedBrowsers: []}; - layer = new OpenLayers.Layer.WMS.Post(name, url, params); + var options = {unsupportedBrowsers: []}; + layer = new OpenLayers.Layer.WMS.Post(name, url, params, options); t.eq( layer.usePost, true, @@ -55,11 +55,10 @@ } map.destroy(); - var browserName = OpenLayers.Util.getBrowserName(); - var options = { unsupportedBrowsers: [browserName]}; - // test the unsupported browser - layer = new OpenLayers.Layer.WMS.Post(name, url, params, options); + layer = new OpenLayers.Layer.WMS.Post(name, url, params, { + unsupportedBrowsers: [OpenLayers.Util.getBrowserName()] + }); map = new OpenLayers.Map('map'); map.addLayer(layer); tile = layer.addTile(bounds, pixel); @@ -69,8 +68,9 @@ layer.destroy(); // test a supported browser - OpenLayers.Util.getBrowserName = function () { return 'not_' + browserName }; - layer = new OpenLayers.Layer.WMS.Post(name, url, params, options); + layer = new OpenLayers.Layer.WMS.Post(name, url, params, { + unsupportedBrowsers: [] + }); map.addLayer(layer); var tile2 = layer.addTile(bounds, pixel); t.ok(