Made sure that css() in IE handles negative non-px values correctly. Fixes #3331.
[jquery.git] / test / unit / fx.js
index da22de2..5b97dc3 100644 (file)
@@ -52,6 +52,15 @@ test("animate(Hash, Object, Function)", function() {
        });
 });
 
+test("animate negative height", function() {
+       expect(1);
+       stop();
+       jQuery("#foo").animate({ height: -100 }, 100, function() {
+               equals( this.offsetHeight, 0, "Verify height." );
+               start();
+       });
+});
+
 /* // This test ends up being flaky depending upon the CPU load
 test("animate option (queue === false)", function () {
        expect(1);
@@ -525,3 +534,18 @@ jQuery.makeTest = function( text ){
 }
 
 jQuery.makeTest.id = 1;
+
+test("jQuery.show('fast') doesn't clear radio buttons (bug #1095)", function () {
+       expect(4);
+  stop();
+
+       var $checkedtest = jQuery("#checkedtest");
+       // IE6 was clearing "checked" in jQuery(elem).show("fast");
+       $checkedtest.hide().show("fast", function() {
+       ok( !! jQuery(":radio:first", $checkedtest).attr("checked"), "Check first radio still checked." );
+       ok( ! jQuery(":radio:last", $checkedtest).attr("checked"), "Check last radio still NOT checked." );
+       ok( !! jQuery(":checkbox:first", $checkedtest).attr("checked"), "Check first checkbox still checked." );
+       ok( ! jQuery(":checkbox:last", $checkedtest).attr("checked"), "Check last checkbox still NOT checked." );
+       start();
+       });
+});