diff --git a/tests/Control/test_MousePosition.html b/tests/Control/test_MousePosition.html index 62b7d721c2..98575dd4e5 100644 --- a/tests/Control/test_MousePosition.html +++ b/tests/Control/test_MousePosition.html @@ -39,14 +39,14 @@ function test_02_Control_MousePosition_redraw_noLayer_displayProjection(t) { t.plan(3); - control = new OpenLayers.Control.MousePosition(); - map = new OpenLayers.Map('map'); + var control = new OpenLayers.Control.MousePosition(); + var map = new OpenLayers.Map('map'); map.addControl(control); t.eq(control.div.innerHTML, "0.00000, 0.00000", "innerHTML set correctly"); control.redraw({'xy': new OpenLayers.Pixel(10,10)}); control.redraw({'xy': new OpenLayers.Pixel(12,12)}); t.eq(control.div.innerHTML, "0.00000, 0.00000", "innerHTML set correctly"); - l = new OpenLayers.Layer('name', {'isBaseLayer': true}); + var l = new OpenLayers.Layer('name', {'isBaseLayer': true}); map.addLayer(l); map.zoomToMaxExtent(); control.redraw({'xy': new OpenLayers.Pixel(10,10)});