[OpenLayers-Commits] r10867 - trunk/openlayers/tests/Layer/WMS

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Tue Nov 2 15:35:02 EDT 2010


Author: tschaub
Date: 2010-11-02 12:35:02 -0700 (Tue, 02 Nov 2010)
New Revision: 10867

Modified:
   trunk/openlayers/tests/Layer/WMS/Post.html
Log:
Fixing up the WMS Post tests so they don't override getBrowserName (closes #2912).

Modified: trunk/openlayers/tests/Layer/WMS/Post.html
===================================================================
--- trunk/openlayers/tests/Layer/WMS/Post.html	2010-11-02 17:32:07 UTC (rev 10866)
+++ trunk/openlayers/tests/Layer/WMS/Post.html	2010-11-02 19:35:02 UTC (rev 10867)
@@ -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(



More information about the Commits mailing list