Fixed viewRequestID regression and mixin issue that caused the mixin to always be applied unless maxGetUrlLength was explicitly set. Includes a regression test for the viewRequestID bit. r=tschaub (closes #2847)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@10773 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2010-09-17 23:20:55 +00:00
parent b8feb3c22e
commit f4a99d4052
3 changed files with 146 additions and 125 deletions
+23
View File
@@ -87,6 +87,29 @@
t.ok( clone.imgDiv == null, "clone's imgDiv was not copied");
}
function test_Tile_Image_IFrame_viewRequestID (t) {
t.plan( 2 );
var map = new OpenLayers.Map('map');
var layer = new OpenLayers.Layer.WMS(
"Name",
"http://labs.metacarta.com/TESTURL?",
{layers: 'basic'}
);
map.addLayer(layer);
var position = new OpenLayers.Pixel(20,30);
var bounds = new OpenLayers.Bounds(1,2,3,4);
tile = layer.addTile(bounds, position);
tile.renderTile();
t.eq(tile.imgDiv.viewRequestID, map.viewRequestID, "viewRequestID correct after renderTile");
map.viewRequestID++;
tile.renderTile();
t.eq(tile.imgDiv.viewRequestID, map.viewRequestID, "viewRequestID correct after subsequent renderTile");
tile.destroy();
layer.destroy();
map.destroy();
}
function test_Tile_Image_draw (t) {
t.plan( 7 );