X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=test%2Funit%2Fmanipulation.js;h=d88400d1fd459b9212850d38530f6e886431c8c6;hb=9e06903a99caf5619d0db858ed3d24f0e6ee15db;hp=81ab3e4ef5fb911be1d6ab42822f421e9cd93468;hpb=14e1200d59345e8ece8d6edfcf75af2e90ae8b72;p=jquery.git diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index 81ab3e4..d88400d 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -866,7 +866,7 @@ test("clone() on XML nodes", function() { } var testHtml = function(valueObj) { - expect(29); + expect(31); jQuery.scriptorder = 0; @@ -883,9 +883,15 @@ var testHtml = function(valueObj) { equals( div.children().length, 2, "Make sure two child nodes exist." ); equals( div.children().children().length, 1, "Make sure that a grandchild exists." ); - equals( jQuery("
").html(valueObj(" "))[0].innerHTML, " ", "Make sure entities are passed through correctly." ); + var space = jQuery("
").html(valueObj(" "))[0].innerHTML; + ok( /^\s$|^ $/.test( space ), "Make sure entities are passed through correctly." ); equals( jQuery("
").html(valueObj("&"))[0].innerHTML, "&", "Make sure entities are passed through correctly." ); + jQuery("#main").html(valueObj("")); + + equals( jQuery("#main").children().length, 1, "Make sure there is a child element." ); + equals( jQuery("#main").children()[0].nodeName.toUpperCase(), "STYLE", "And that a style element was inserted." ); + reset(); // using contents will get comments regular, text, and comment nodes var j = jQuery("#nonnodes").contents();