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:
29
tests/Handler/test_Drag.html
Normal file
29
tests/Handler/test_Drag.html
Normal file
@@ -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>
|
||||
Reference in New Issue
Block a user