Temporary fix for WFS race condition where a tile is destroy()ed but an associated httprequest has not yet returned. Great report, Pierre G. (Closes #820)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@4227 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2007-09-12 02:37:09 +00:00
parent f662d49682
commit 315f20bc9b
2 changed files with 32 additions and 11 deletions

View File

@@ -26,6 +26,21 @@
t.ok( tile.events != null, "tile's events intitialized");
}
function test_Tile_WFS_requestSuccess(t) {
t.plan(1);
var layer = {}; // bogus layer
var position = new OpenLayers.Pixel(10,20);
var bounds = new OpenLayers.Bounds(1,2,3,4);
var url = "bobob";
var size = new OpenLayers.Size(5,6);
tile = new OpenLayers.Tile.WFS(layer, position, bounds, url, size);
tile.destroy();
tile.requestSuccess({'requestText': '<xml><foo /></xml>'});
t.ok(true, "Didn't fail after calling requestSuccess on destroyed tile.");
}
function test_99_Tile_WFS_destroy(t) {
t.plan( 6 );