fix more tests in opera
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5460 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
activated = handler.deactivate();
|
||||
t.ok(activated,
|
||||
"deactivate returns true if the handler was active already");
|
||||
map.destroy();
|
||||
}
|
||||
|
||||
function test_Handler_RegularPolygon_deactivation(t) {
|
||||
@@ -56,6 +57,7 @@
|
||||
t.eq(handler.layer, null,
|
||||
"deactivate doesn't throw an error if layer was" +
|
||||
" previously destroyed");
|
||||
map.destroy();
|
||||
}
|
||||
|
||||
function test_Handler_RegularPolygon_four_corners(t) {
|
||||
@@ -98,6 +100,7 @@
|
||||
t.eq(handler.feature.geometry.getBounds().toBBOX(),
|
||||
"34.15625,-22.09375,36.15625,-20.09375",
|
||||
"bounds with manual radius setting and mousemove");
|
||||
map.destroy();
|
||||
}
|
||||
|
||||
function test_Handler_RegularPolygon_circle(t) {
|
||||
@@ -140,6 +143,7 @@
|
||||
t.eq(handler.feature.geometry.getBounds().toBBOX(),
|
||||
"34.159333,-8.028167,36.153167,-6.034333",
|
||||
"bounds with manual radius setting and mousemove");
|
||||
map.destroy();
|
||||
}
|
||||
|
||||
function test_Handler_RegularPolygon_irregular(t) {
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
t.eq( layer1.grid.length, 4, "Grid rows with buffer:1" );
|
||||
map.setBaseLayer(layer2);
|
||||
t.eq( layer2.grid.length, 6, "Grid rows with buffer:2" );
|
||||
map.destroy();
|
||||
}
|
||||
|
||||
function test_02_Layer_KaMap_inittiles (t) {
|
||||
@@ -66,6 +67,7 @@
|
||||
map.setCenter(new OpenLayers.LonLat(0,0),5);
|
||||
t.eq( layer.grid.length, 8, "KaMap rows is correct." );
|
||||
t.eq( layer.grid[0].length, 6, "KaMap cols is correct." );
|
||||
map.destroy();
|
||||
|
||||
}
|
||||
|
||||
@@ -83,6 +85,7 @@
|
||||
layer.clearGrid();
|
||||
|
||||
t.ok( layer.grid != null, "layer.grid does not get nullified" );
|
||||
map.destroy();
|
||||
}
|
||||
|
||||
|
||||
@@ -115,6 +118,7 @@
|
||||
map.zoom = 5;
|
||||
|
||||
t.eq( layer.getResolution(), 0.0439453125, "getResolution() returns correct value");
|
||||
map.destroy();
|
||||
}
|
||||
|
||||
function test_06_Layer_KaMap_getZoomForExtent(t) {
|
||||
@@ -134,6 +138,7 @@
|
||||
zoom = layer.getZoomForExtent(bounds);
|
||||
|
||||
t.eq( zoom, 2, "getZoomForExtent() returns correct value");
|
||||
map.destroy();
|
||||
}
|
||||
|
||||
function test_06_Layer_kaMap_mergeNewParams (t) {
|
||||
@@ -160,6 +165,7 @@
|
||||
newParams.chickpeas = 151;
|
||||
|
||||
t.eq( layer.params.chickpeas, "image/png", "mergeNewParams() makes clean copy of hashtable");
|
||||
map.destroy();
|
||||
}
|
||||
|
||||
|
||||
@@ -207,6 +213,7 @@
|
||||
t.eq( clone.CLASS_NAME, "OpenLayers.Layer.KaMap", "Clone is a ka-map layer");
|
||||
|
||||
layer.grid = null;
|
||||
map.destroy();
|
||||
}
|
||||
|
||||
function test_11_Layer_KaMap_setMap(t) {
|
||||
@@ -222,6 +229,7 @@
|
||||
|
||||
t.ok( layer.tileSize != null, "tileSize has been set");
|
||||
t.ok( (layer.tileSize.h == 50) && (layer.tileSize.w == 500), "tileSize has been set correctly");
|
||||
map.destroy();
|
||||
}
|
||||
function test_12_Layer_KaMap_getTileBounds(t) {
|
||||
t.plan(2);
|
||||
@@ -240,6 +248,7 @@
|
||||
map.pan(200,0);
|
||||
var bounds = layer.getTileBounds(new OpenLayers.Pixel(200,200));
|
||||
t.eq(bounds.toBBOX(), "0,0,180,180", "get tile bounds returns correct bounds after pan");
|
||||
map.destroy();
|
||||
}
|
||||
|
||||
function test_99_Layer_KaMap_destroy (t) {
|
||||
@@ -264,6 +273,7 @@
|
||||
layer.destroy();
|
||||
|
||||
t.ok( layer.grid == null, "tiles appropriately destroyed");
|
||||
map.destroy();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user