prototype: Add tests for Element#match.

This commit is contained in:
Tobie Langel 2008-01-23 12:45:28 +00:00
parent b26f4e349e
commit a5fe12b9a1
2 changed files with 6 additions and 0 deletions

View File

@ -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]

View File

@ -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) {