Fixed unit tests following r729.
git-svn-id: http://svn.openlayers.org/branches/openlayers/1.0@767 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
control = new OpenLayers.Control.PanZoom();
|
||||
map.addControl(control,
|
||||
new OpenLayers.Pixel(20,20));
|
||||
map.setCenter(new OpenLayers.LonLat(0,0), 0);
|
||||
map.setCenter(new OpenLayers.LonLat(0,0), 4);
|
||||
var res = map.getResolution();
|
||||
control.buttons[0].onmousedown(evt);
|
||||
t.eq( map.getCenter().lat, res*50, "Pan up works correctly" );
|
||||
@@ -45,12 +45,12 @@
|
||||
t.eq( map.getCenter().lat, 0, "Pan down works correctly" );
|
||||
control.buttons[4].onmousedown(evt);
|
||||
control.buttons[4].onmousedown(evt);
|
||||
t.eq( map.getZoom(), 2, "zoomin workds correctly" );
|
||||
t.eq( map.getZoom(), 6, "zoomin works correctly" );
|
||||
control.buttons[6].onmousedown(evt);
|
||||
t.eq( map.getZoom(), 1, "zoomout workds correctly" );
|
||||
t.eq( map.getZoom(), 5, "zoomout works correctly" );
|
||||
control.buttons[4].onmousedown(evt);
|
||||
control.buttons[5].onmousedown(evt);
|
||||
t.eq( map.getZoom(), 0, "zoomworld workds correctly" );
|
||||
t.eq( map.getZoom(), 2, "zoomworld works correctly" );
|
||||
|
||||
}
|
||||
// -->
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
map.zoomTo(5);
|
||||
t.eq( map.getZoom(), 5, "map.zoom is correct after calling zoomTo" );
|
||||
map.zoomToFullExtent();
|
||||
t.eq( map.getZoom(), 0, "map.zoom is correct after calling zoomToFullExtent" );
|
||||
t.eq( map.getZoom(), 2, "map.zoom is correct after calling zoomToFullExtent" );
|
||||
var lonlat = map.getCenter();
|
||||
var zero = new OpenLayers.LonLat(0, 0);
|
||||
t.ok( lonlat.equals(zero), "map center is correct after calling zoomToFullExtent" );
|
||||
|
||||
Reference in New Issue
Block a user