Fixed #1095 bug where radio buttons became unchecked during show(). Also added unit test and had to fix a selector test that was broken by the new testing div in test/index.html. Last made some whitespace changes.

This commit is contained in:
David Serduke 2007-11-16 23:39:23 +00:00
parent b9371a6ca4
commit e2ef3df86d
5 changed files with 69 additions and 38 deletions

View file

@ -389,6 +389,18 @@ test("css(String, Object)", function() {
ok( $('#foo').css('opacity') == '1', "Assert opacity is 1 when set to an empty String" );
});
test("jQuery.css(elem, 'height') doesn't clear radio buttons (bug #1095)", function () {
expect(4);
var $checkedtest = $("#checkedtest");
// IE6 was clearing "checked" in jQuery.css(elem, "height");
jQuery.css($checkedtest[0], "height");
ok( !! $(":radio:first", $checkedtest).attr("checked"), "Check first radio still checked." );
ok( ! $(":radio:last", $checkedtest).attr("checked"), "Check last radio still NOT checked." );
ok( !! $(":checkbox:first", $checkedtest).attr("checked"), "Check first checkbox still checked." );
ok( ! $(":checkbox:last", $checkedtest).attr("checked"), "Check last checkbox still NOT checked." );
});
test("text()", function() {
expect(1);
var expected = "This link has class=\"blog\": Simon Willison's Weblog";