From 0fd898859ff86029f82b7258407fad0642a72990 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Mon, 17 Dec 2007 06:14:00 +0000 Subject: [PATCH] fix more tests in opera git-svn-id: http://svn.openlayers.org/trunk/openlayers@5460 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- tests/Handler/test_RegularPolygon.html | 4 ++++ tests/Layer/test_KaMap.html | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/tests/Handler/test_RegularPolygon.html b/tests/Handler/test_RegularPolygon.html index 09ef9b6ec9..5d022b2023 100644 --- a/tests/Handler/test_RegularPolygon.html +++ b/tests/Handler/test_RegularPolygon.html @@ -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) { diff --git a/tests/Layer/test_KaMap.html b/tests/Layer/test_KaMap.html index a79bd7d50a..8818fda996 100644 --- a/tests/Layer/test_KaMap.html +++ b/tests/Layer/test_KaMap.html @@ -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(); }