From 10d3266013d7fc2064236e34c9ce97e39cb18850 Mon Sep 17 00:00:00 2001 From: euzuro Date: Wed, 11 Jul 2007 17:04:07 +0000 Subject: [PATCH] fix drag handler test for IE. for whatever reason, ie and ff handle the tests in different order. because IE runs through the functions numerically, the constructor test is run first, and so the changes to the handler's initialize are maintained throughout the rest of the tests. thus, we need to make sure to set it back before exiting. git-svn-id: http://svn.openlayers.org/trunk/openlayers@3698 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- tests/Handler/test_Drag.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/Handler/test_Drag.html b/tests/Handler/test_Drag.html index 0b6f3af51f..19706372db 100644 --- a/tests/Handler/test_Drag.html +++ b/tests/Handler/test_Drag.html @@ -8,6 +8,10 @@ control.id = Math.random(); var callbacks = {foo: "bar"}; var options = {bar: "foo"}; + + OpenLayers.Handler.prototype._initialize = + OpenLayers.Handler.prototype.initialize; + OpenLayers.Handler.prototype.initialize = function(con, call, opt) { t.eq(con.id, control.id, "constructor calls parent with the correct control"); @@ -17,6 +21,10 @@ "constructor calls parent with the correct options"); } var drag = new OpenLayers.Handler.Drag(control, callbacks, options); + + OpenLayers.Handler.prototype.initialize = + OpenLayers.Handler.prototype._initialize; + } function test_Handler_Drag_activate(t) {