start testing the drag handler
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3689 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -0,0 +1,29 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script src="../../lib/OpenLayers.js"></script>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
function test_Handler_Drag_constructor(t) {
|
||||||
|
t.plan(3);
|
||||||
|
var map = new OpenLayers.Map('map');
|
||||||
|
var control = new OpenLayers.Control();
|
||||||
|
control.id = Math.random();
|
||||||
|
var callbacks = {foo: "bar"};
|
||||||
|
var options = {bar: "foo"};
|
||||||
|
map.addControl(control);
|
||||||
|
OpenLayers.Handler.prototype.initialize = function(con, call, opt) {
|
||||||
|
t.eq(con.id, control.id,
|
||||||
|
"constructor calls parent with the correct control");
|
||||||
|
t.eq(call, callbacks,
|
||||||
|
"constructor calls parent with the correct callbacks");
|
||||||
|
t.eq(opt, options,
|
||||||
|
"constructor calls parent with the correct options");
|
||||||
|
}
|
||||||
|
var drag = new OpenLayers.Handler.Drag(control, callbacks, options);
|
||||||
|
}
|
||||||
|
// -->
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="map" style="width: 300px; height: 150px;"/>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -64,5 +64,6 @@
|
|||||||
<li>Control/test_Permalink.html</li>
|
<li>Control/test_Permalink.html</li>
|
||||||
<li>Control/test_Scale.html</li>
|
<li>Control/test_Scale.html</li>
|
||||||
<li>test_Handler.html</li>
|
<li>test_Handler.html</li>
|
||||||
|
<li>Handler/test_Drag.html</li>
|
||||||
<li>test_Map.html</li>
|
<li>test_Map.html</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Reference in New Issue
Block a user