diff --git a/tests/Events.html b/tests/Events.html index 238ec54af1..dd5964618c 100644 --- a/tests/Events.html +++ b/tests/Events.html @@ -46,34 +46,34 @@ var ev = { 'object': {}, - 'listeners': { - 'listenerA': { - 'push': function(options){ - gObjA = options.obj; - gFuncA = options.func; - } - }, - 'listenerB': { + 'listeners': { + 'listenerA': { + 'push': function(options){ + gObjA = options.obj; + gFuncA = options.func; + } + }, + 'listenerB': { 'push': function(options){ gObjB = options.obj; gFuncB = options.func; } } - }, - 'eventTypes': ['listenerA', 'listenerB'] - }; - - var type = null; - var object = null; - var func = null; + }, + 'eventTypes': ['listenerA', 'listenerB'] + }; + + var type = null; + var object = null; + var func = null; //func null gObjA = null; gFuncA = null; gObjB = null; gFuncB = null; - OpenLayers.Events.prototype.register.apply(ev, [type, object, func]); + OpenLayers.Events.prototype.register.apply(ev, [type, object, func]); t.ok((gObjA == null) && (gFuncA == null) && - (gObjB == null) && (gFuncB == null), "no push called func null"); - - //valid func, type not in ev.eventTypes + (gObjB == null) && (gFuncB == null), "no push called func null"); + + //valid func, type not in ev.eventTypes func = function() {}; gObjA = null; gFuncA = null; gObjB = null; gFuncB = null; OpenLayers.Events.prototype.register.apply(ev, [type, object, func]); @@ -89,13 +89,13 @@ //valid func, type in ev.eventTypes, valid obj type = 'listenerB'; - object = {}; + object = {}; gObjA = null; gFuncA = null; gObjB = null; gFuncB = null; OpenLayers.Events.prototype.register.apply(ev, [type, object, func]); t.ok((gObjA == null) && (gFuncA == null) && (gObjB == object) && (gFuncB == func), "push called on listenerB's mock array when type passed in 'listenerB'."); - } + } function test_Events_register_unregister(t) { diff --git a/tests/Layer/Grid.html b/tests/Layer/Grid.html index c9e86612d8..aeb2f3daa3 100644 --- a/tests/Layer/Grid.html +++ b/tests/Layer/Grid.html @@ -36,9 +36,9 @@ //regression testing for #1502 t.ok( layer.events.listeners['tileloaded'].length == 0, "no listeners for tileloaded preregister"); - var obj = {}; - var func = function() {}; - layer.events.register('tileloaded', obj, func); + var obj = {}; + var func = function() {}; + layer.events.register('tileloaded', obj, func); t.ok( layer.events.listeners['tileloaded'].length == 1, "one listener for tileloaded after register"); }