OpenLayers OpenLayers

Changeset 138

Show
Ignore:
Timestamp:
05/18/06 08:33:41 (3 years ago)
Author:
crschmidt
Message:

Test for r137, event constructor with null EventTypes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/tests/test_Events.html

    r61 r138  
    55    var map;  
    66    function test_01_Events_constructor (t) { 
    7     t.plan( 18 ); 
     7        t.plan( 18 ); 
    88        var obj = {result: 0}, eventTypes = ["doThingA", "doThingB", "doThingC"]; 
    9     events = new OpenLayers.Events(obj, $('map'), eventTypes); 
    10     t.ok( events instanceof OpenLayers.Events, "new OpenLayers.Control returns object" ); 
     9        events = new OpenLayers.Events(obj, $('map'), eventTypes); 
     10        t.ok( events instanceof OpenLayers.Events, "new OpenLayers.Control returns object" ); 
    1111        t.ok( events.div instanceof HTMLDivElement, "events.div isa HTMLDivElement" ); 
    1212        t.ok( events.object === obj, "events.object is the object we passed" ); 
     
    3434        t.eq( obj.result, 2, "result is 2 after we call triggerEvent with no event" ); 
    3535    } 
     36    function test_02_Events_nullEventTypes (t) { 
     37        t.plan(1); 
     38        events = new OpenLayers.Events(null, $('map'), null); 
     39        t.ok( events.listeners, "Creation of Events with null Event Types is okay" ); 
     40    } 
    3641  // --> 
    3742  </script>