}
var testHtml = function(valueObj) {
- expect(29);
+ expect(31);
jQuery.scriptorder = 0;
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("<div/>").html(valueObj(" "))[0].innerHTML, " ", "Make sure entities are passed through correctly." );
+ var space = jQuery("<div/>").html(valueObj(" "))[0].innerHTML;
+ ok( /^\s$|^ $/.test( space ), "Make sure entities are passed through correctly." );
equals( jQuery("<div/>").html(valueObj("&"))[0].innerHTML, "&", "Make sure entities are passed through correctly." );
+ jQuery("#main").html(valueObj("<style>.foobar{color:green;}</style>"));
+
+ 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();