X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=test%2Funit%2Fmanipulation.js;h=031bf5b720277db2656a7efd231e25ab3432c63e;hb=0474917c9d82fa13d865282d2da2d3cb6e5b89ec;hp=7db8d5bae0a2800fad2edbec77e91460ad485988;hpb=f06e0e5575bc8f82d0fcbd5880bb9d8ccf361bfa;p=jquery.git
diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js
index 7db8d5b..031bf5b 100644
--- a/test/unit/manipulation.js
+++ b/test/unit/manipulation.js
@@ -793,7 +793,7 @@ test("clone() on XML nodes", function() {
}
var testHtml = function(valueObj) {
- expect(22);
+ expect(24);
jQuery.scriptorder = 0;
@@ -805,6 +805,11 @@ var testHtml = function(valueObj) {
}
ok( pass, "Set HTML" );
+ div = jQuery("
").html( valueObj('') );
+
+ equals( div.children().length, 2, "Make sure two child nodes exist." );
+ equals( div.children().children().length, 1, "Make sure that a grandchild exists." );
+
reset();
// using contents will get comments regular, text, and comment nodes
var j = jQuery("#nonnodes").contents();
@@ -972,7 +977,7 @@ test("empty()", function() {
});
test("jQuery.cleanData", function() {
- expect(10);
+ expect(14);
var type, pos, div, child;
@@ -1002,6 +1007,9 @@ test("jQuery.cleanData", function() {
// Should do nothing
pos = "Inner";
child.trigger("click");
+
+ // Should trigger 2
+ div.remove();
type = "html";
@@ -1018,6 +1026,9 @@ test("jQuery.cleanData", function() {
// Should do nothing
pos = "Inner";
child.trigger("click");
+
+ // Should trigger 2
+ div.remove();
function getDiv() {
var div = jQuery("").click(function(){
@@ -1040,4 +1051,4 @@ test("jQuery.cleanData", function() {
return div;
}
-});
\ No newline at end of file
+});