[Commits] r1419 - core/trunk/geoext/tests/lib/GeoExt/widgets

commits at geoext.org commits at geoext.org
Tue Oct 13 09:12:22 CEST 2009


Author: ahocevar
Date: 2009-10-13 09:12:22 +0200 (Tue, 13 Oct 2009)
New Revision: 1419

Modified:
   core/trunk/geoext/tests/lib/GeoExt/widgets/LegendPanel.html
   core/trunk/geoext/tests/lib/GeoExt/widgets/MapPanel.html
Log:
Fixed IE test errors by obeying the we-create-we-destroy rule: It is important that the application destroys an OpenLayers.Map instance that is used in a GeoExt.MapPanel ''before'' the MapPanel is destroyed. In cases where the MapPanel creates the OL.Map instance, there is no need to destroy the map.

Modified: core/trunk/geoext/tests/lib/GeoExt/widgets/LegendPanel.html
===================================================================
--- core/trunk/geoext/tests/lib/GeoExt/widgets/LegendPanel.html	2009-10-12 18:50:22 UTC (rev 1418)
+++ core/trunk/geoext/tests/lib/GeoExt/widgets/LegendPanel.html	2009-10-13 07:12:22 UTC (rev 1419)
@@ -222,6 +222,7 @@
             t.eq(lp.items.length, 2, "With no filter both layers are drawn");
 
             lp.destroy();
+            map.destroy();
             mapPanel.destroy();
 
         }

Modified: core/trunk/geoext/tests/lib/GeoExt/widgets/MapPanel.html
===================================================================
--- core/trunk/geoext/tests/lib/GeoExt/widgets/MapPanel.html	2009-10-12 18:50:22 UTC (rev 1418)
+++ core/trunk/geoext/tests/lib/GeoExt/widgets/MapPanel.html	2009-10-13 07:12:22 UTC (rev 1419)
@@ -69,8 +69,6 @@
             panel = new GeoExt.MapPanel({
             });
             t.eq(panel.map.allOverlays, true, "allOverlays set to true if no map is provided to panel");
-            // since we created the map, we destroy it
-            map.destroy();
             panel.destroy();
             
             panel = new GeoExt.MapPanel({
@@ -79,8 +77,6 @@
                 }
             });
             t.eq(panel.map.allOverlays, true, "allOverlays set to true if map config is provided to panel");
-            // since we created the map, we destroy it
-            map.destroy();
             panel.destroy();
             
         }
@@ -287,6 +283,7 @@
                 }]
             });
 
+            map.destroy();
             panel.destroy();
         }
 



More information about the Commits mailing list