Fixing tests after r12247 - img.src is now only available after a delay, because it is set in the load handler after setting a blank image as src. There is no need to check for img.src in layer tests, because this is asserted by Tile.Image tests (see #3419)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@12249 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -53,20 +53,15 @@
|
||||
imgy:128,
|
||||
imgxy:[256,256]
|
||||
});
|
||||
t.eq( img.src,
|
||||
t.eq( tile.url,
|
||||
url + "?" + OpenLayers.Util.getParameterString(tParams).replace(/,/g, "+"),
|
||||
"image src is created correctly via addtile" );
|
||||
t.eq( tile.frame.style.top, "6px", "image top is set correctly via addtile" );
|
||||
t.eq( tile.frame.style.left, "5px", "image top is set correctly via addtile" );
|
||||
|
||||
var firstChild = layer.div.firstChild.firstChild;
|
||||
if (!isMozilla)
|
||||
t.ok( true, "skipping element test outside of Mozilla");
|
||||
else
|
||||
t.ok( firstChild instanceof HTMLElement, "div first child is an image object" );
|
||||
t.eq( firstChild.src,
|
||||
url + "?" + OpenLayers.Util.getParameterString(tParams).replace(/,/g, "+"),
|
||||
"div first child is correct image object" );
|
||||
t.eq( firstChild.nodeName.toLowerCase(), "img", "div first child is an image object" );
|
||||
t.ok( firstChild == img, "div first child is correct image object" );
|
||||
t.eq( tile.position.toString(), "x=5,y=6", "Position of tile is set correctly." );
|
||||
map.destroy();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user