Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 6462

Show
Ignore:
Timestamp:
03/25/07 20:43:38 (2 years ago)
Author:
mislav
Message:

functional tests cleanup; real stopPropagation test

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • spinoffs/prototype/branches/event/test/functional/event.html

    r6454 r6462  
    99  <script type="text/javascript"> 
    1010    var Prototype = { 
    11     Version: '<%= PROTOTYPE_VERSION %>', 
     11    Version: 'inline', 
    1212     
    1313    Browser: { 
     
    144144      el = $(this.parentNode) 
    145145      e.preventDefault() 
    146  
    147       setTimeout(function(){ 
    148         if (window.location.hash == '#wrong') el.failed( 
    149           'Hijack failed (<a href="' + window.location.toString().replace(/#.+$/, '') + '">remove the fragment</a>)') 
     146      log(e) 
     147 
     148      setTimeout(function() { 
     149        if (window.location.hash == '#wrong') el.failed('Hijack failed (<a href="' + 
     150            window.location.toString().replace(/#.+$/, '') + '">remove the fragment</a>)') 
    150151        else el.passed() 
    151       }, 20) 
    152  
    153       log(e) 
    154       //return false 
     152      }, 50) 
    155153    }) 
    156154  </script> 
     
    182180  <script type="text/javascript"> 
    183181    $('right').observe('click', function(e){ 
    184       if(!Event.isLeftClick(e)) this.failed() 
    185       else this.passed() 
     182      if (Event.isLeftClick(e)) this.passed() 
     183      else this.failed() 
    186184      log(e) 
    187185    }) 
     
    192190  <script type="text/javascript"> 
    193191    $('stop').observe('click', function(e){ 
    194       Event.stop(e
     192      e.stopPropagation(
    195193      this.passed() 
    196194      log(e)