git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c7407bd
)
Tweaked the live test to be a bit simpler.
author
jeresig
<jeresig@gmail.com>
Mon, 30 Nov 2009 18:50:25 +0000
(13:50 -0500)
committer
jeresig
<jeresig@gmail.com>
Mon, 30 Nov 2009 18:50:25 +0000
(13:50 -0500)
test/unit/event.js
patch
|
blob
|
history
diff --git
a/test/unit/event.js
b/test/unit/event.js
index
7481008
..
e2ed0e3
100644
(file)
--- a/
test/unit/event.js
+++ b/
test/unit/event.js
@@
-793,15
+793,17
@@
test(".live()/.die()", function() {
jQuery('span#liveSpan1 a').click();
equals( lived, 1, "Verify that only one first handler occurred." );
jQuery('span#liveSpan1 a').click();
equals( lived, 1, "Verify that only one first handler occurred." );
- equals( livee, 0, "Verify that second handler don't." );
+ equals( livee, 0, "Verify that second handler doesn't." );
// and one pair in inverse
jQuery('#liveHandlerOrder span#liveSpan2').live('click', function(){ livee++; });
jQuery('#liveHandlerOrder span#liveSpan2 a').live('click', function(){ lived++; return false; });
// and one pair in inverse
jQuery('#liveHandlerOrder span#liveSpan2').live('click', function(){ livee++; });
jQuery('#liveHandlerOrder span#liveSpan2 a').live('click', function(){ lived++; return false; });
+ lived = 0;
+ livee = 0;
jQuery('span#liveSpan2 a').click();
jQuery('span#liveSpan2 a').click();
- equals( lived, 2, "Verify that only one first handler occurred." );
- equals( livee, 0, "Verify that second handler don't." );
+ equals( lived, 1, "Verify that only one first handler occurred." );
+ equals( livee, 0, "Verify that second handler doesn't." );
// Cleanup
jQuery("span#liveSpan1 a, span#liveSpan1, span#liveSpan2 a, span#liveSpan2").die("click");
// Cleanup
jQuery("span#liveSpan1 a, span#liveSpan1, span#liveSpan2 a, span#liveSpan2").die("click");