the default controls of the editing and navigation toolbars are not activated, p=jorix, r=me (closes #3268)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11964 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2011-05-10 07:09:17 +00:00
parent fef7e4febf
commit e1be8e9dfb
6 changed files with 49 additions and 3 deletions

View File

@@ -0,0 +1,30 @@
<html>
<head>
<script src="../OLLoader.js"></script>
<script type="text/javascript">
function test_ctor_draw(t) {
t.plan(4);
var map = new OpenLayers.Map('map');
var vLayer = new OpenLayers.Layer.Vector();
map.addLayer(vLayer);
var editingToolbar = new OpenLayers.Control.EditingToolbar(vLayer);
map.addControl(editingToolbar);
t.ok(editingToolbar instanceof OpenLayers.Control.EditingToolbar,
"new OpenLayers.Control.EditingToolbar returns object" );
t.ok(editingToolbar.controls[0] instanceof OpenLayers.Control.Navigation,
"EditingToolbar contains Control.Navigation object" );
t.eq(editingToolbar.controls[0].active, true,
"First control is active" );
t.eq(editingToolbar.controls.length, 4,
"EditingToolbar contains 4 Controls" );
map.destroy();
}
</script>
</head>
<body>
<div id="map" style="width: 1024px; height: 512px;"/>
</body>
</html>