From 1be7117f5bc3fd29546d98e5e4b98e48258b3585 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Sun, 21 May 2006 18:54:06 +0000 Subject: [PATCH] Fix tests from recent projection change. git-svn-id: http://svn.openlayers.org/trunk/openlayers@242 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- tests/test_Layer_WMS.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_Layer_WMS.html b/tests/test_Layer_WMS.html index ed1d0683d6..e3dedd7e27 100644 --- a/tests/test_Layer_WMS.html +++ b/tests/test_Layer_WMS.html @@ -19,13 +19,15 @@ function test_02_Layer_WMS_addtile (t) { t.plan( 6 ); layer = new OpenLayers.Layer.WMS('Test Layer', "http://octo.metacarta.com/cgi-bin/mapserv", {map: '/mapdata/vmap_wms.map', layers: 'basic', format: 'image/jpeg'}); + var map = new OpenLayers.Map($('map')); + map.addLayer(layer); var pixel = new OpenLayers.Pixel(5,6); var tile = layer.addTile(new OpenLayers.Bounds(1,2,3,4), pixel); - t.eq( tile.img.src, "http://octo.metacarta.com/cgi-bin/mapserv?bbox=1,2,3,4&width=256&height=256&map=/mapdata/vmap_wms.map&layers=basic&format=image/jpeg&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:4326&styles=&exceptions=application/vnd.ogc.se_inimage", "image src is created correctly via addtile" ); + t.eq( tile.img.src, "http://octo.metacarta.com/cgi-bin/mapserv?bbox=1,2,3,4&width=256&height=256&map=/mapdata/vmap_wms.map&layers=basic&format=image/jpeg&service=WMS&version=1.1.1&request=GetMap&styles=&exceptions=application/vnd.ogc.se_inimage&srs=EPSG:4326", "image src is created correctly via addtile" ); t.eq( tile.img.style.top, "6px", "image top is set correctly via addtile" ); t.eq( tile.img.style.left, "5px", "image top is set correctly via addtile" ); t.ok( layer.div.firstChild instanceof HTMLImageElement, "div first child is an image object" ); - t.eq( layer.div.firstChild.src, "http://octo.metacarta.com/cgi-bin/mapserv?bbox=1,2,3,4&width=256&height=256&map=/mapdata/vmap_wms.map&layers=basic&format=image/jpeg&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:4326&styles=&exceptions=application/vnd.ogc.se_inimage", "div first child is correct image object" ); + t.eq( layer.div.firstChild.src, "http://octo.metacarta.com/cgi-bin/mapserv?bbox=1,2,3,4&width=256&height=256&map=/mapdata/vmap_wms.map&layers=basic&format=image/jpeg&service=WMS&version=1.1.1&request=GetMap&styles=&exceptions=application/vnd.ogc.se_inimage&srs=EPSG:4326", "div first child is correct image object" ); var pos = tile.getPosition(); t.eq( pos.toString(), "x=5,y=6", "Position of tile is set correctly." ); }