diff --git a/tests/Layer/ArcGIS93Rest.html b/tests/Layer/ArcGIS93Rest.html index 7c815b773e..4f1a4c618d 100644 --- a/tests/Layer/ArcGIS93Rest.html +++ b/tests/Layer/ArcGIS93Rest.html @@ -155,8 +155,7 @@ map.addLayer(layer); map.zoomToMaxExtent(); - var redraw = OpenLayers.Layer.prototype.redraw; - OpenLayers.Layer.prototype.redraw = function() { + layer.redraw = function() { t.ok(true, "layer is redrawn after new params merged"); } @@ -168,8 +167,6 @@ newParams.CHICKPEAS = 151; t.eq( layer.params.CHICKPEAS, "png", "mergeNewParams() makes clean copy of hashtable"); - - OpenLayers.Layer.prototype.redraw = redraw; map.destroy(); } diff --git a/tests/Layer/HTTPRequest.html b/tests/Layer/HTTPRequest.html index 2025677fe4..02311564f1 100644 --- a/tests/Layer/HTTPRequest.html +++ b/tests/Layer/HTTPRequest.html @@ -92,14 +92,13 @@ t.eq( log[0].scope, scope, "mergeNewParams() executes changelayer listener with expected scope"); newParams.chickpeas = 151; - t.eq( layer.params.chickpeas, "image/png", "mergeNewParams() makes clean copy of hash"); - var redraw = OpenLayers.Layer.prototype.redraw; - OpenLayers.Layer.prototype.redraw = function() { - t.eq(this.resolution, null, 'mergeNewParams sets layer resolution to null, causing redraw to call moveTo with zoomChanged set to true'); - }; + t.eq( layer.params.chickpeas, "image/png", "mergeNewParams() makes clean copy of hash"); + + layer.redraw = function() { + t.ok(true, "layer.mergeNewParams calls layer.redraw"); + } layer.mergeNewParams(); - OpenLayers.Layer.prototype.redraw = redraw; } function test_Layer_HTTPRequest_getFullRequestString (t) { diff --git a/tests/Layer/KaMap.html b/tests/Layer/KaMap.html index b2c22cf650..b22917fda0 100644 --- a/tests/Layer/KaMap.html +++ b/tests/Layer/KaMap.html @@ -153,9 +153,7 @@ map.addLayer(layer); map.zoomToMaxExtent(); - - var redraw = OpenLayers.Layer.prototype.redraw; - OpenLayers.Layer.prototype.redraw = function() { + layer.redraw = function() { t.ok(true, "layer is redrawn after new params merged"); } @@ -167,8 +165,6 @@ newParams.chickpeas = 151; t.eq( layer.params.chickpeas, "image/png", "mergeNewParams() makes clean copy of hashtable"); - - OpenLayers.Layer.prototype.redraw = redraw; map.destroy(); } diff --git a/tests/Layer/MapGuide.html b/tests/Layer/MapGuide.html index f71218071c..b1eb386c27 100644 --- a/tests/Layer/MapGuide.html +++ b/tests/Layer/MapGuide.html @@ -132,8 +132,7 @@ map.addLayer(layer); map.zoomToMaxExtent(); - var redraw = OpenLayers.Layer.prototype.redraw; - OpenLayers.Layer.prototype.redraw = function() { + layer.redraw = function() { t.ok(true, "layer is redrawn after new params merged"); } @@ -145,8 +144,6 @@ newParams.chickpeas = 151; t.eq( layer.params.chickpeas, "image/png", "mergeNewParams() makes clean copy of hashtable"); - - OpenLayers.Layer.prototype.redraw = redraw; map.destroy(); } diff --git a/tests/Layer/MapServer.html b/tests/Layer/MapServer.html index ff8cdf4e53..16e59156e3 100644 --- a/tests/Layer/MapServer.html +++ b/tests/Layer/MapServer.html @@ -136,8 +136,7 @@ map.addLayer(layer); map.zoomToMaxExtent(); - var redraw = OpenLayers.Layer.prototype.redraw; - OpenLayers.Layer.prototype.redraw = function() { + layer.redraw = function() { t.ok(true, "layer is redrawn after new params merged"); } layer.mergeNewParams(newParams); @@ -148,8 +147,6 @@ newParams.chickpeas = 151; t.eq( layer.params.chickpeas, "image/png", "mergeNewParams() makes clean copy of hashtable"); - - OpenLayers.Layer.prototype.redraw = redraw; map.destroy(); } diff --git a/tests/Layer/WMS.html b/tests/Layer/WMS.html index bb04560c88..a07b36c1d9 100644 --- a/tests/Layer/WMS.html +++ b/tests/Layer/WMS.html @@ -195,8 +195,7 @@ map.addLayer(layer); map.zoomToMaxExtent(); - var redraw = OpenLayers.Layer.prototype.redraw; - OpenLayers.Layer.prototype.redraw = function() { + layer.redraw = function() { t.ok(true, "layer is redrawn after new params merged"); } @@ -208,8 +207,6 @@ newParams.CHICKPEAS = 151; t.eq( layer.params.CHICKPEAS, "image/png", "mergeNewParams() makes clean copy of hashtable"); - - OpenLayers.Layer.prototype.redraw = redraw; map.destroy(); }