Files
openlayers/tests/Handler/test_Drag.html
Tim Schaub f7f75bf8c2 start testing the drag handler
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3689 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-07-10 22:48:33 +00:00

30 lines
1001 B
HTML

<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>