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:
36a98b9
)
Made some additional tests for #5785.
author
jeresig
<jeresig@gmail.com>
Mon, 11 Jan 2010 21:08:39 +0000
(16:08 -0500)
committer
jeresig
<jeresig@gmail.com>
Mon, 11 Jan 2010 21:08:39 +0000
(16:08 -0500)
test/unit/manipulation.js
patch
|
blob
|
history
diff --git
a/test/unit/manipulation.js
b/test/unit/manipulation.js
index
52becfe
..
046d363
100644
(file)
--- a/
test/unit/manipulation.js
+++ b/
test/unit/manipulation.js
@@
-626,7
+626,7
@@
test("insertAfter(String|Element|Array<Element>|jQuery)", function() {
});
var testReplaceWith = function(val) {
});
var testReplaceWith = function(val) {
- expect(16);
+ expect(17);
jQuery('#yahoo').replaceWith(val( '<b id="replace">buga</b>' ));
ok( jQuery("#replace")[0], 'Replace element with string' );
ok( !jQuery("#yahoo")[0], 'Verify that original element is gone, after string' );
jQuery('#yahoo').replaceWith(val( '<b id="replace">buga</b>' ));
ok( jQuery("#replace")[0], 'Replace element with string' );
ok( !jQuery("#yahoo")[0], 'Verify that original element is gone, after string' );
@@
-651,9
+651,13
@@
var testReplaceWith = function(val) {
reset();
var tmp = jQuery("<div/>").appendTo("body").click(function(){ ok(true, "Newly bound click run." ); });
var y = jQuery('#yahoo').click(function(){ ok(true, "Previously bound click run." ); });
reset();
var tmp = jQuery("<div/>").appendTo("body").click(function(){ ok(true, "Newly bound click run." ); });
var y = jQuery('#yahoo').click(function(){ ok(true, "Previously bound click run." ); });
+ var child = y.append("<b>test</b>").find("b").click(function(){ ok(true, "Child bound click run." ); return false; });
+
y.replaceWith( tmp );
y.replaceWith( tmp );
+
tmp.click();
y.click();
tmp.click();
y.click();
+ child.click();
reset();
reset();