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

Changeset 8704

Show
Ignore:
Timestamp:
01/23/08 12:45:28 (8 months ago)
Author:
tobie
Message:

prototype: Add tests for Element#match.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • spinoffs/prototype/trunk/CHANGELOG

    r8703 r8704  
    11*SVN* 
     2 
     3* Add tests for Element#match.  [Tobie Langel] 
    24 
    35* Fix Element#writeAttribute to work with 'cellspacing' and 'cellpadding' attributes in IE. Closes #9983. [/dev/urandom, Tobie Langel] 
  • spinoffs/prototype/trunk/test/unit/selector.html

    r8692 r8704  
    230230    testElementMatch: function() {with(this) { 
    231231      var span = $('dupL1'); 
     232       
    232233      // tests that should pass 
    233234      assert(span.match('span')); 
     
    249250      assert(!$('link_2').match('a[rel^=external]')); 
    250251      assert($('link_1').match('a[rel^=external]')); 
     252       
     253      assert(span.match({ match: function(element) { return true }}), 'custom selector'); 
     254      assert(!span.match({ match: function(element) { return false }}), 'custom selector'); 
    251255    }}, 
    252256