diff --git a/CHANGELOG b/CHANGELOG index 10410b8..5f0c3e9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Add tests for Element#match. [Tobie Langel] + * Fix Element#writeAttribute to work with 'cellspacing' and 'cellpadding' attributes in IE. Closes #9983. [/dev/urandom, Tobie Langel] * Prevent a potential security issue for cross-site ajax requests. [Alexey Feldgendler, sam, Tobie Langel] diff --git a/test/unit/selector.html b/test/unit/selector.html index 6ccb819..f4e93f9 100644 --- a/test/unit/selector.html +++ b/test/unit/selector.html @@ -229,6 +229,7 @@ testElementMatch: function() {with(this) { var span = $('dupL1'); + // tests that should pass assert(span.match('span')); assert(span.match('span#dupL1')); @@ -248,6 +249,9 @@ assert(!$('link_2').match('a[rel^=external]')); assert($('link_1').match('a[rel^=external]')); + + assert(span.match({ match: function(element) { return true }}), 'custom selector'); + assert(!span.match({ match: function(element) { return false }}), 'custom selector'); }}, testSelectorWithSpaceInAttributeValue: function() {with(this) {