aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2011-10-24 18:05:53 -0400
committerDave Methvin <dave.methvin@gmail.com>2011-10-24 18:05:53 -0400
commit746074f0f74b0c0916fb2db2b6370c324822f31a (patch)
treebaf8f24be0f41de1d260606e0b78be456955f13d /test
parentee3eb6cabf1383efe479e090fe6ad8ed2e5a09a3 (diff)
downloadjquery-746074f0f74b0c0916fb2db2b6370c324822f31a.tar.gz
jquery-746074f0f74b0c0916fb2db2b6370c324822f31a.zip
Remove attribute match from quickIs
As @timmywil points out, attributes and properties are confused by IE6/7. This commit also reworks the unit test case to do a better job of checking className matches.
Diffstat (limited to 'test')
-rw-r--r--test/unit/event.js25
1 files changed, 7 insertions, 18 deletions
diff --git a/test/unit/event.js b/test/unit/event.js
index de9c225c1..35664b022 100644
--- a/test/unit/event.js
+++ b/test/unit/event.js
@@ -2409,11 +2409,11 @@ test(".on and .off", function() {
});
test("delegated events quickIs", function() {
- expect(17);
+ expect(14);
var markup = jQuery(
'<div>'+
'<p class="D">'+
- 'dead<b devo="cool">beat</b>club'+
+ 'dead<b class="devo-like">beat</b>club'+
'</p>'+
'<q id="famous">'+
'worked<em>or</em>borked?<em></em>'+
@@ -2437,29 +2437,18 @@ test("delegated events quickIs", function() {
.appendTo( "body" )
.on( "blink", "em", func )
.on( "blink", ".D", func )
+ .on( "blink", ".devo-like", func )
+ .on( "blink", ".devo", func )
.on( "blink", ".d", func )
.on( "blink", "p.d", func )
- .on( "blink", "[devo=cool]", func )
- .on( "blink", "[devo='NO']", func )
.on( "blink", "#famous", func );
- check( "[devo=cool]", "b|[devo=cool] p|.D" );
- check( "[devo='']", "" );
+ check( ".devo-like", "b|.devo-like p|.D" );
+ check( ".devo", "" );
check( "p", "p|.D" );
- check( "b", "b|[devo=cool] p|.D" );
+ check( "b", "b|.devo-like p|.D" );
check( "em", "em|em q|#famous em|em q|#famous" );
- markup.find( "b" ).attr( "devo", "NO" );
- check( "b", "b|[devo='NO'] p|.D" );
-
- markup
- .on( "blink", ".tricky", function() {
- ok( false, "triggered on wrong class name match" );
- })
- .find( "p" )
- .attr( "class", "tricky-match" )
- .trigger( "blink" );
-
markup.remove();
});