prototype: Add tests for Element#match.
This commit is contained in:
parent
b26f4e349e
commit
a5fe12b9a1
|
@ -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]
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue