Fix tests in opera by cleaning up after ourselves and destroying our maps. TMS
tests now pass. git-svn-id: http://svn.openlayers.org/trunk/openlayers@5459 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
layer.clearGrid();
|
||||
|
||||
t.ok( layer.grid != null, "layer.grid does not get nullified" );
|
||||
map.destroy();
|
||||
}
|
||||
|
||||
|
||||
@@ -65,6 +66,7 @@
|
||||
map.zoom = 5;
|
||||
|
||||
t.eq( layer.getResolution(), 0.0439453125, "getResolution() returns correct value");
|
||||
map.destroy();
|
||||
}
|
||||
|
||||
function test_06_Layer_TMS_getZoomForExtent(t) {
|
||||
@@ -84,6 +86,7 @@
|
||||
zoom = layer.getZoomForExtent(bounds);
|
||||
|
||||
t.eq( zoom, 2, "getZoomForExtent() returns correct value");
|
||||
map.destroy();
|
||||
}
|
||||
|
||||
|
||||
@@ -125,6 +128,7 @@
|
||||
layer.url = ["http://tilecache1/", "http://tilecache2/", "http://tilecache3/"];
|
||||
tileurl = layer.getURL(new OpenLayers.Bounds(3.515625,45,4.21875,45.703125));
|
||||
t.eq(tileurl, "http://tilecache1/1.0.0/basic/9/261/192.png", "Tile URL is deterministic");
|
||||
map.destroy();
|
||||
}
|
||||
function test_Layer_TMS_Rounding(t) {
|
||||
t.plan(1);
|
||||
@@ -134,6 +138,7 @@
|
||||
m.addLayer(layer);
|
||||
m.zoomToMaxExtent()
|
||||
t.eq(layer.getURL(layer.grid[3][3].bounds), "http://labs.metacarta.com/wms-c/Basic.py/1.0.0/basic/0/1/1.png", "TMS tiles around rounded properly.");
|
||||
m.destroy();
|
||||
}
|
||||
|
||||
|
||||
@@ -149,6 +154,7 @@
|
||||
|
||||
t.eq(layer.tileOrigin.lat, -90, "lat is -90");
|
||||
t.eq(layer.tileOrigin.lon, -180, "lon is -180");
|
||||
map.destroy();
|
||||
}
|
||||
|
||||
function test_99_Layer_TMS_destroy (t) {
|
||||
@@ -173,6 +179,7 @@
|
||||
layer.destroy();
|
||||
|
||||
t.ok( layer.grid == null, "tiles appropriately destroyed");
|
||||
map.destroy();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user