#385: building for windows users (fix license) #453: IE gives new DOM elements a parent with fragment node type #454: Fix tests which are breaking in Opera #455: Util.isEquivalentUrl broken in Opera #463: map.setBaseLayer is a bit funky #464: Overview Map dissappears when on permalinked page #465: allow controls to live outside viewport (for real) #466: HTMLDivElement is still undefined in IE7 (but OpenLayers.Util.alphaHack() is now false) #467: isEquivalentURL() not complete for IE #468: Overview MapLosing Rectangle #469: Default marker is incorrectly centered #470: Can not use "search" property IE7 #473: Remove call to checkImgURL #474: overview map isn't properly updated when the argparser kicks in git-svn-id: http://svn.openlayers.org/branches/openlayers/2.3@2181 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
43 lines
1.5 KiB
HTML
43 lines
1.5 KiB
HTML
<html>
|
|
<head>
|
|
<script src="../lib/OpenLayers.js"></script>
|
|
<script type="text/javascript"><!--
|
|
var icon;
|
|
|
|
function test_01_Icon_constructor (t) {
|
|
t.plan( 4 );
|
|
var size = new OpenLayers.Size(5,6);
|
|
icon = new OpenLayers.Icon("", size);
|
|
t.ok( icon instanceof OpenLayers.Icon, "new OpenLayers.Icon returns Icon object" );
|
|
t.ok( icon.size instanceof OpenLayers.Size, "icon.size returns Size object" );
|
|
t.ok( icon.size.equals(size), "icon.size returns correct value" );
|
|
t.eq( icon.url, "", "icon.url returns str object" );
|
|
}
|
|
function test_02_Icon_clone (t) {
|
|
t.plan( 4 );
|
|
icon = new OpenLayers.Icon("a",new OpenLayers.Size(5,6));
|
|
t.ok( icon instanceof OpenLayers.Icon, "new OpenLayers.Icon returns Icon object" );
|
|
var cloned = icon.clone();
|
|
t.ok( cloned instanceof OpenLayers.Icon, "clone is an OpenLayers.Icon" );
|
|
cloned.url = "b"
|
|
t.eq( icon.url, "a", "icon.url doesn't change with clone's url" );
|
|
t.eq( cloned.url, "b", "cloned.url does change when edited" );
|
|
}
|
|
|
|
function test_03_Marker_setOpacity(t) {
|
|
t.plan( 2 );
|
|
|
|
icon = new OpenLayers.Icon("a",new OpenLayers.Size(5,6));
|
|
t.ok(!icon.imageDiv.style.opacity, "default icon has no opacity");
|
|
|
|
icon.setOpacity(0.5);
|
|
t.eq(parseFloat(icon.imageDiv.style.opacity), 0.5, "icon.setOpacity() works");
|
|
}
|
|
|
|
// -->
|
|
</script>
|
|
</head>
|
|
<body>
|
|
</body>
|
|
</html>
|