Fix all cases where we have Windows line endings, and set eol-style="native"
on all files. Hopefully, this makes it easier for people to write patches and do other neat things. git-svn-id: http://svn.openlayers.org/trunk/openlayers@1424 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
+105
-105
@@ -1,105 +1,105 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript"><!--
|
||||
var popup;
|
||||
|
||||
function test_01_Popup_default_constructor(t) {
|
||||
t.plan( 8 );
|
||||
|
||||
var size = new OpenLayers.Size(OpenLayers.Popup.WIDTH,
|
||||
OpenLayers.Popup.HEIGHT);
|
||||
popup = new OpenLayers.Popup();
|
||||
|
||||
t.ok( popup instanceof OpenLayers.Popup, "new OpenLayers.Popup returns Popup object" );
|
||||
t.ok(popup.id.startsWith("OpenLayers.Popup"), "valid default popupid");
|
||||
var firstID = popup.id;
|
||||
t.ok(popup.size.equals(size), "good default popup.size");
|
||||
t.eq(popup.contentHTML, "", "good default popup.contentHTML");
|
||||
t.eq(popup.backgroundColor, OpenLayers.Popup.COLOR, "good default popup.backgroundColor");
|
||||
t.eq(popup.opacity, OpenLayers.Popup.OPACITY, "good default popup.opacity");
|
||||
t.eq(popup.border, OpenLayers.Popup.BORDER, "good default popup.border");
|
||||
|
||||
|
||||
popup = new OpenLayers.Popup();
|
||||
var newID = popup.id;
|
||||
t.ok(newID != firstID, "default id generator creating unique ids");
|
||||
}
|
||||
|
||||
function test_02_Popup_constructor (t) {
|
||||
t.plan( 5 );
|
||||
|
||||
var id = "chicken";
|
||||
var w = 500;
|
||||
var h = 400;
|
||||
var sz = new OpenLayers.Size(w,h);
|
||||
var lon = 5;
|
||||
var lat = 40;
|
||||
var ll = new OpenLayers.LonLat(lon, lat);
|
||||
var content = "foo";
|
||||
|
||||
popup = new OpenLayers.Popup(id,
|
||||
ll,
|
||||
sz,
|
||||
content);
|
||||
|
||||
t.ok( popup instanceof OpenLayers.Popup, "new OpenLayers.Popup returns Popup object" );
|
||||
t.eq(popup.id, id, "popup.id set correctly");
|
||||
t.ok(popup.lonlat.equals(ll), "popup.lonlat set correctly");
|
||||
t.ok(popup.size.equals(sz), "popup.size set correctly");
|
||||
t.eq(popup.contentHTML, content, "contentHTML porpoerty of set correctly");
|
||||
}
|
||||
|
||||
function test_03_Popup_draw(t) {
|
||||
|
||||
t.plan( 11 );
|
||||
|
||||
var id = "chicken";
|
||||
var x = 50;
|
||||
var y = 100;
|
||||
var w = 500;
|
||||
var h = 400;
|
||||
var content = "charlie";
|
||||
var color = "red";
|
||||
var opacity = 0.5;
|
||||
var border = "1px solid";
|
||||
|
||||
|
||||
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));
|
||||
|
||||
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");
|
||||
t.eq(popup.div.innerHTML, content, "good default popup.contentHTML");
|
||||
t.eq(popup.div.style.backgroundColor, color, "good default popup.backgroundColor");
|
||||
|
||||
if (navigator.appName.indexOf("Microsoft") == -1) {
|
||||
t.eq(parseFloat(popup.div.style.opacity), opacity, "good default popup.opacity");
|
||||
} else {
|
||||
t.eq(popup.div.style.filter, "alpha(opacity=" + opacity*100 + ")", "good default popup.opacity");
|
||||
}
|
||||
t.ok(popup.div.style.border.indexOf(border) != -1, "good default popup.border");
|
||||
|
||||
x += 50;
|
||||
popup.moveTo(new OpenLayers.Pixel(x, y));
|
||||
t.eq(popup.div.style.left, x + "px", "moveTo updates left position of popup.div correctly");
|
||||
t.eq(popup.div.style.top, y + "px", "moveTo updates top position of popup.div correctly");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="../lib/OpenLayers.js"></script>
|
||||
<script type="text/javascript"><!--
|
||||
var popup;
|
||||
|
||||
function test_01_Popup_default_constructor(t) {
|
||||
t.plan( 8 );
|
||||
|
||||
var size = new OpenLayers.Size(OpenLayers.Popup.WIDTH,
|
||||
OpenLayers.Popup.HEIGHT);
|
||||
popup = new OpenLayers.Popup();
|
||||
|
||||
t.ok( popup instanceof OpenLayers.Popup, "new OpenLayers.Popup returns Popup object" );
|
||||
t.ok(popup.id.startsWith("OpenLayers.Popup"), "valid default popupid");
|
||||
var firstID = popup.id;
|
||||
t.ok(popup.size.equals(size), "good default popup.size");
|
||||
t.eq(popup.contentHTML, "", "good default popup.contentHTML");
|
||||
t.eq(popup.backgroundColor, OpenLayers.Popup.COLOR, "good default popup.backgroundColor");
|
||||
t.eq(popup.opacity, OpenLayers.Popup.OPACITY, "good default popup.opacity");
|
||||
t.eq(popup.border, OpenLayers.Popup.BORDER, "good default popup.border");
|
||||
|
||||
|
||||
popup = new OpenLayers.Popup();
|
||||
var newID = popup.id;
|
||||
t.ok(newID != firstID, "default id generator creating unique ids");
|
||||
}
|
||||
|
||||
function test_02_Popup_constructor (t) {
|
||||
t.plan( 5 );
|
||||
|
||||
var id = "chicken";
|
||||
var w = 500;
|
||||
var h = 400;
|
||||
var sz = new OpenLayers.Size(w,h);
|
||||
var lon = 5;
|
||||
var lat = 40;
|
||||
var ll = new OpenLayers.LonLat(lon, lat);
|
||||
var content = "foo";
|
||||
|
||||
popup = new OpenLayers.Popup(id,
|
||||
ll,
|
||||
sz,
|
||||
content);
|
||||
|
||||
t.ok( popup instanceof OpenLayers.Popup, "new OpenLayers.Popup returns Popup object" );
|
||||
t.eq(popup.id, id, "popup.id set correctly");
|
||||
t.ok(popup.lonlat.equals(ll), "popup.lonlat set correctly");
|
||||
t.ok(popup.size.equals(sz), "popup.size set correctly");
|
||||
t.eq(popup.contentHTML, content, "contentHTML porpoerty of set correctly");
|
||||
}
|
||||
|
||||
function test_03_Popup_draw(t) {
|
||||
|
||||
t.plan( 11 );
|
||||
|
||||
var id = "chicken";
|
||||
var x = 50;
|
||||
var y = 100;
|
||||
var w = 500;
|
||||
var h = 400;
|
||||
var content = "charlie";
|
||||
var color = "red";
|
||||
var opacity = 0.5;
|
||||
var border = "1px solid";
|
||||
|
||||
|
||||
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));
|
||||
|
||||
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");
|
||||
t.eq(popup.div.innerHTML, content, "good default popup.contentHTML");
|
||||
t.eq(popup.div.style.backgroundColor, color, "good default popup.backgroundColor");
|
||||
|
||||
if (navigator.appName.indexOf("Microsoft") == -1) {
|
||||
t.eq(parseFloat(popup.div.style.opacity), opacity, "good default popup.opacity");
|
||||
} else {
|
||||
t.eq(popup.div.style.filter, "alpha(opacity=" + opacity*100 + ")", "good default popup.opacity");
|
||||
}
|
||||
t.ok(popup.div.style.border.indexOf(border) != -1, "good default popup.border");
|
||||
|
||||
x += 50;
|
||||
popup.moveTo(new OpenLayers.Pixel(x, y));
|
||||
t.eq(popup.div.style.left, x + "px", "moveTo updates left position of popup.div correctly");
|
||||
t.eq(popup.div.style.top, y + "px", "moveTo updates top position of popup.div correctly");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user