aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/fx.js
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2009-12-05 00:10:19 -0500
committerJohn Resig <jeresig@gmail.com>2009-12-05 00:10:19 -0500
commitb24da33f52f8ce536ae60a6cbffeb2f5cf02bac5 (patch)
tree8bb205a4a518f232e710a71f52dddaea9a1607fe /test/unit/fx.js
parent8d1efee3167deedd33bf7f6001823706659704ea (diff)
downloadjquery-b24da33f52f8ce536ae60a6cbffeb2f5cf02bac5.tar.gz
jquery-b24da33f52f8ce536ae60a6cbffeb2f5cf02bac5.zip
Make sure that width or height don't animate to a negative value. Fixes #3881.
Diffstat (limited to 'test/unit/fx.js')
-rw-r--r--test/unit/fx.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit/fx.js b/test/unit/fx.js
index c259a3896..5b97dc33f 100644
--- a/test/unit/fx.js
+++ b/test/unit/fx.js
@@ -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);