From 04f72a0e07b15eadfd31e81ee9de096b4dd48bf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Fri, 30 Dec 2011 23:28:21 +0100 Subject: [PATCH] tests for the tileAnimation map option --- tests/Map.html | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/Map.html b/tests/Map.html index faad0b30c7..4f2c37b656 100644 --- a/tests/Map.html +++ b/tests/Map.html @@ -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)});