From f0db21f9c9f7d98067923f7ed519214933012ad3 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Mon, 7 Jan 2013 18:16:23 +0100 Subject: [PATCH] Fixing tests --- tests/Layer/Grid.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/Layer/Grid.html b/tests/Layer/Grid.html index ce36c72673..2bdd5d79f6 100644 --- a/tests/Layer/Grid.html +++ b/tests/Layer/Grid.html @@ -1132,12 +1132,17 @@ var tile = layer.grid[1][1]; t.ok(OpenLayers.Element.hasClass(tile.imgDiv, 'olTileReplacing'), 'tile is marked for being replaced'); t.ok(document.getElementById(tile.id + '_bb'), 'backbuffer created for tile'); + // simulate a css declaration where '.olTileReplacing' sets display + // to none. + tile.imgDiv.style.display = 'none'; tile.onImageLoad(); t.ok(!OpenLayers.Element.hasClass(tile.imgDiv, 'olTileReplacing'), 'tile replaced, no longer marked'); t.ok(!document.getElementById(tile.id + '_bb'), 'backbuffer removed for tile'); layer.mergeNewParams({foo: 'baz'}); tile = layer.grid[1][1]; + // simulate a css declaration where '.olTileReplacing' does not set + // display to none. tile.imgDiv.style.display = 'block'; tile.onImageLoad(); t.ok(!OpenLayers.Element.hasClass(tile.imgDiv, 'olTileReplacing'), 'tile replaced, no longer marked');