bring back changes from r6718 that i accidentally blew away
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6725 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
+6
-8
@@ -84,9 +84,10 @@
|
||||
popup.lonlat = true;
|
||||
popup.updatePosition();
|
||||
t.ok(true, "update position doesn't fail when getLayerPxFromLonLat fails.");
|
||||
map.destroy();
|
||||
}
|
||||
function test_Popup_draw(t) {
|
||||
t.plan( 17 );
|
||||
t.plan( 13 );
|
||||
|
||||
var id = "chicken";
|
||||
var x = 50;
|
||||
@@ -98,31 +99,28 @@
|
||||
var hexColor = "#ff0000";
|
||||
var opacity = 0.5;
|
||||
var border = "1px solid";
|
||||
|
||||
map1 = new OpenLayers.Map("map");
|
||||
popup = new OpenLayers.Popup(id);
|
||||
popup.setSize(new OpenLayers.Size(w, h));
|
||||
popup.setContentHTML(content);
|
||||
popup.setBackgroundColor(color);
|
||||
popup.setOpacity(opacity);
|
||||
popup.setBorder(border);
|
||||
popup.draw(new OpenLayers.Pixel(x, y));
|
||||
map1.addPopup(popup);
|
||||
popup.moveTo(new OpenLayers.Pixel(x, y));
|
||||
|
||||
t.eq(popup.div.id, id, "popup.div.id set correctly");
|
||||
t.eq(popup.div.style.left, x + "px", "left position of popup.div set correctly");
|
||||
t.eq(popup.div.style.top, y + "px", "top position of popup.div set correctly");
|
||||
t.eq(popup.div.style.width, w + "px", "width position of popup.div set correctly");
|
||||
t.eq(popup.div.style.height, h + "px", "heightposition of popup.div set correctly");
|
||||
|
||||
var contentDiv = popup.div.childNodes[0].childNodes[0];
|
||||
|
||||
t.eq(contentDiv.className, "olPopupContent", "correct content div className");
|
||||
t.eq(contentDiv.id, "chicken_contentDiv", "correct content div id");
|
||||
t.eq(contentDiv.style.width, "500px", "correct content div width");
|
||||
t.eq(contentDiv.style.height, "400px", "correct content div height");
|
||||
t.eq(contentDiv.style.position, "relative", "correct content div position");
|
||||
//Safari 3 separates style overflow into overflow-x and overflow-y
|
||||
var prop = (OpenLayers.Util.getBrowserName() == 'safari') ? 'overflowX' : 'overflow';
|
||||
t.eq(contentDiv.style[prop], "hidden", "correct content div overflow");
|
||||
t.eq(contentDiv.style[prop], "", "correct content div overflow");
|
||||
t.eq(contentDiv.innerHTML, content, "correct content div content");
|
||||
|
||||
var bColor = popup.div.style.backgroundColor;
|
||||
|
||||
Reference in New Issue
Block a user