From d3151ccb40cab42501b017d67066bcbfe1fb26e0 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Thu, 31 Jul 2008 20:49:59 +0000 Subject: [PATCH] Updated Control.KeyboardDefaults tests, but not the Handler.Keyboard tests. git-svn-id: http://svn.openlayers.org/trunk/openlayers@7648 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- tests/Handler/Keyboard.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/Handler/Keyboard.html b/tests/Handler/Keyboard.html index 9589ef485a..0ea739ce31 100644 --- a/tests/Handler/Keyboard.html +++ b/tests/Handler/Keyboard.html @@ -42,7 +42,7 @@ } function test_Handler_Keyboard_activate(t) { - t.plan(11); + t.plan(8); var map = new OpenLayers.Map('map'); var control = new OpenLayers.Control(); map.addControl(control); @@ -54,14 +54,14 @@ handler.active = false; handler.dragging = true; var old = OpenLayers.Event.stopObserving; - var types = ["keydown", "keypress", "keyup"]; + var types = ["keydown", "keyup"]; OpenLayers.Event.observe = function(obj, type, method) { - t.ok(obj == window, - "activate calls stopObserving with correct object"); + t.ok(obj == document, + "activate calls observing with correct object"); var validType = (OpenLayers.Util.indexOf(types, type) != -1); - t.ok(validType, "activate calls stopObserving for " + type); + t.ok(validType, "activate calls observe for " + type); t.ok(method == handler.eventListener, - "activate calls stopObserving with correct method"); + "activate calls observing with correct method"); }; activated = handler.activate(); t.ok(activated, @@ -71,7 +71,7 @@ } function test_Handler_Drag_deactivate(t) { - t.plan(11); + t.plan(8); var map = new OpenLayers.Map('map'); var control = new OpenLayers.Control(); map.addControl(control); @@ -82,9 +82,9 @@ "deactivate returns false if the handler was not already active"); handler.active = true; var old = OpenLayers.Event.stopObserving; - var types = ["keydown", "keypress", "keyup"]; + var types = ["keydown", "keyup"]; OpenLayers.Event.stopObserving = function(obj, type, method) { - t.ok(obj == window, + t.ok(obj == document, "deactivate calls stopObserving with correct object"); var validType = (OpenLayers.Util.indexOf(types, type) != -1); t.ok(validType, "deactivate calls stopObserving for " + type);