fixing error when closing page in IE. Thanks bartvde for the testcase. r=bartvde (closes #3003)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11145 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2011-02-18 15:22:12 +00:00
parent 28e5614e98
commit d6695cff67
3 changed files with 28 additions and 1 deletions

26
tests/Handler/Box.html Normal file
View File

@@ -0,0 +1,26 @@
<html>
<head>
<script src="../../lib/OpenLayers.js"></script>
<script type="text/javascript">
function test_Handler_Box_destroy(t) {
t.plan(1);
var map = new OpenLayers.Map('map');
var control = new OpenLayers.Control();
map.addControl(control);
var handler = new OpenLayers.Handler.Box(control);
handler.activate();
try {
handler.destroy();
t.ok(true, "destroying the box handler should not raise any error");
} catch(err) {
t.fail("destroying the box handler causes trouble: " + err);
}
map.destroy();
}
</script>
</head>
<body>
<div id="map" style="width: 300px; height: 150px;"/>
</body>
</html>