Pullup r2999:3087 for RC2.

svn merge trunk/openlayers/@2999 trunk/openlayers/@HEAD branches/openlayers/2.4/



git-svn-id: http://svn.openlayers.org/branches/openlayers/2.4@3088 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-04-20 01:10:43 +00:00
parent b6fb16153c
commit b5103eb8ce
58 changed files with 1399 additions and 503 deletions

View File

@@ -118,7 +118,7 @@
function test_05_Layer_visibility(t) {
t.plan(3)
t.plan(5)
var layer = new OpenLayers.Layer('Test Layer');
@@ -129,6 +129,22 @@
layer.setVisibility(true);
t.eq(layer.getVisibility(), true, "setVisibility true works");
// Need a map in order to have moveTo called.
// Tests added for #654.
var layer = new OpenLayers.Layer.WMS('Test Layer','http://example.com');
var m = new OpenLayers.Map('map');
m.addLayer(layer);
m.zoomToMaxExtent();
layermoved = false;
layer.moveTo = function() { layermoved = true; }
layer.setVisibility(false);
t.eq(layermoved, false, "Layer didn't move when calling setvis false");
layer.setVisibility(true);
t.eq(layermoved, true, "Layer moved when calling setvis true.");
}