Controls need updating. This update should fix the tests from the attribution

control addition. This should be fixed better -- specifying the index is the
wrong way to test this.  


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4337 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-09-16 16:43:25 +00:00
parent 8a3fb3dce3
commit 65466b0c27
5 changed files with 13 additions and 13 deletions

View File

@@ -17,9 +17,9 @@
t.ok( map instanceof OpenLayers.Map, "new OpenLayers.Map creates map" );
map.addControl(control);
t.ok( control.map === map, "Control.map is set to the map object" );
t.ok( map.controls[3] === control, "map.controls contains control" );
t.eq( parseInt(control.div.style.zIndex), map.Z_INDEX_BASE['Control'] + 4, "Control div zIndexed properly" );
t.eq( parseInt(map.viewPortDiv.lastChild.style.zIndex), map.Z_INDEX_BASE['Control'] + 4, "Viewport div contains control div" );
t.ok( map.controls[4] === control, "map.controls contains control" );
t.eq( parseInt(control.div.style.zIndex), map.Z_INDEX_BASE['Control'] + 5, "Control div zIndexed properly" );
t.eq( parseInt(map.viewPortDiv.lastChild.style.zIndex), map.Z_INDEX_BASE['Control'] + 5, "Viewport div contains control div" );
t.eq( control.div.style.left, "6px", "Control div left located correctly by default");
t.eq( control.div.style.top, "300px", "Control div top located correctly by default");

View File

@@ -19,9 +19,9 @@
t.ok( map instanceof OpenLayers.Map, "new OpenLayers.Map creates map" );
map.addControl(control);
t.ok( control.map === map, "Control.map is set to the map object" );
t.ok( map.controls[3] === control, "map.controls contains control" );
t.eq( parseInt(control.div.style.zIndex), map.Z_INDEX_BASE['Control'] + 6, "Control div zIndexed properly" );
t.eq( parseInt(map.viewPortDiv.lastChild.style.zIndex), map.Z_INDEX_BASE['Control'] + 6, "Viewport div contains control div" );
t.ok( map.controls[4] === control, "map.controls contains control" );
t.eq( parseInt(control.div.style.zIndex), map.Z_INDEX_BASE['Control'] + 7, "Control div zIndexed properly" );
t.eq( parseInt(map.viewPortDiv.lastChild.style.zIndex), map.Z_INDEX_BASE['Control'] + 7, "Viewport div contains control div" );
// t.eq( control.div.style.top, "6px", "Control div top located correctly by default");
}

View File

@@ -18,9 +18,9 @@
t.ok( map instanceof OpenLayers.Map, "new OpenLayers.Map creates map" );
map.addControl(control);
t.ok( control.map === map, "Control.map is set to the map object" );
t.ok( map.controls[3] === control, "map.controls contains control" );
t.eq( parseInt(control.div.style.zIndex), map.Z_INDEX_BASE['Control'] + 4, "Control div zIndexed properly" );
t.eq( parseInt(map.viewPortDiv.lastChild.style.zIndex), map.Z_INDEX_BASE['Control'] + 4, "Viewport div contains control div" );
t.ok( map.controls[4] === control, "map.controls contains control" );
t.eq( parseInt(control.div.style.zIndex), map.Z_INDEX_BASE['Control'] + 5, "Control div zIndexed properly" );
t.eq( parseInt(map.viewPortDiv.lastChild.style.zIndex), map.Z_INDEX_BASE['Control'] + 5, "Viewport div contains control div" );
map.destroy();
}

View File

@@ -21,9 +21,9 @@
t.ok( map instanceof OpenLayers.Map, "new OpenLayers.Map creates map" );
map.addControl(control);
t.ok( control.map === map, "Control.map is set to the map object" );
t.ok( map.controls[3] === control, "map.controls contains control" );
t.eq( parseInt(control.div.style.zIndex), map.Z_INDEX_BASE['Control'] + 4, "Control div zIndexed properly" );
t.eq( parseInt(map.viewPortDiv.lastChild.style.zIndex), map.Z_INDEX_BASE['Control'] + 4, "Viewport div contains control div" );
t.ok( map.controls[4] === control, "map.controls contains control" );
t.eq( parseInt(control.div.style.zIndex), map.Z_INDEX_BASE['Control'] + 5, "Control div zIndexed properly" );
t.eq( parseInt(map.viewPortDiv.lastChild.style.zIndex), map.Z_INDEX_BASE['Control'] + 5, "Viewport div contains control div" );
t.eq( control.div.style.top, "4px", "Control div top located correctly by default");
var control2 = new OpenLayers.Control.PanZoom();

View File

@@ -65,7 +65,7 @@
t.ok( control instanceof OpenLayers.Control.Permalink, "new OpenLayers.Control returns object" );
map = new OpenLayers.Map('map');
map.addControl(control);
t.eq(map.controls[3].div.firstChild.nodeName, "A", "Permalink control creates div with 'a' inside." );
t.eq(map.controls[4].div.firstChild.nodeName, "A", "Permalink control creates div with 'a' inside." );
}
function test_05_Control_Permalink_base_with_query (t) {
t.plan( 3 );