Fix broken handler test due to r5891 in IE.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@5892 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2008-01-25 17:07:15 +00:00
parent e4ec1b58b0
commit 8901982955

View File

@@ -71,7 +71,10 @@
function test_Handler_deactivate(t) {
t.plan(52);
var map = new OpenLayers.Map('map');
var map = new OpenLayers.Map('map', { controls: []});
// No controls so that we don't get more thingies than we expect
// when we actually clean up after ourselves: r5891 caused this
// because we actually destroy things now on the navigation control.
var control = new OpenLayers.Control();
map.addControl(control);
@@ -87,7 +90,8 @@
handler.activate();
map.events.unregister = function(type, obj, func) {
var r = func();
try {
var r = func();
if(typeof r == "string") {
// this is one of the mock handler methods
t.ok(OpenLayers.Util.indexOf(events, type) > -1,