tests for the tileAnimation map option

This commit is contained in:
Éric Lemoine
2011-12-30 23:28:21 +01:00
parent afce5be5d6
commit 04f72a0e07

View File

@@ -115,6 +115,24 @@
map.destroy();
}
function test_Map_constructor_tileanim(t) {
t.plan(4);
map = new OpenLayers.Map("map");
t.eq(map.tileAnimation, true,
'tileAnimation is true by default');
t.ok(OpenLayers.Element.hasClass(map.div, 'olMapTileAnim'),
'map div is assigned the olMapTileAnim class by default');
map.destroy();
map = new OpenLayers.Map("map", {tileAnimation: false});
t.eq(map.tileAnimation, false,
'tileAnimation is false if option is false');
t.ok(OpenLayers.Element.hasClass(map.div, 'olMapTileAnim'),
'map div not assigned the olMapTileAnim class if tileAnimation is false');
map.destroy();
}
function test_Map_setOptions(t) {
t.plan(2);
map = new OpenLayers.Map('map', {maxExtent: new OpenLayers.Bounds(100, 200, 300, 400)});