Slightly altered a test that was causing IE7 in some cases to hard crash. The test was setting .html() to many divs, some of which were inside other divs effectly deleting them from the DOM. I suspect this caused some instability and may only have been an IE7 with IEDevBar issue. The test still correctly tests the functionality of that unit test.

This commit is contained in:
David Serduke 2007-11-18 00:46:58 +00:00
parent 264ffbc73b
commit 2e2a1b8910

View File

@ -883,11 +883,11 @@ var scriptorder = 0;
test("html(String)", function() { test("html(String)", function() {
expect(10); expect(10);
var div = $("div"); var div = $("#main > div");
div.html("<b>test</b>"); div.html("<b>test</b>");
var pass = true; var pass = true;
for ( var i = 0; i < div.size(); i++ ) { for ( var i = 0; i < div.size(); i++ ) {
if ( div.get(i).childNodes.length == 0 ) pass = false; if ( div.get(i).childNodes.length != 1 ) pass = false;
} }
ok( pass, "Set HTML" ); ok( pass, "Set HTML" );