aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/effects.js
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2013-01-26 22:02:15 -0500
committerDave Methvin <dave.methvin@gmail.com>2013-01-26 22:05:08 -0500
commit3f9f2b1dbcefdafc5ef11f7deb222a3b6d8941d8 (patch)
treeb6ed8522a63eb2907121140120d6f39a516b9c77 /test/unit/effects.js
parent74aa3eb79c3329c9f58135f814132d9f99a98fbe (diff)
downloadjquery-3f9f2b1dbcefdafc5ef11f7deb222a3b6d8941d8.tar.gz
jquery-3f9f2b1dbcefdafc5ef11f7deb222a3b6d8941d8.zip
Fix #12846. Restore overflow when animation is stopped.
(Cherry picked from a6c358d)
Diffstat (limited to 'test/unit/effects.js')
-rw-r--r--test/unit/effects.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/unit/effects.js b/test/unit/effects.js
index aa061058b..173af5a0e 100644
--- a/test/unit/effects.js
+++ b/test/unit/effects.js
@@ -1787,16 +1787,18 @@ asyncTest("Animation callbacks (#11797)", 15, function() {
});
});
-test( "Animate properly sets overflow hidden when animating width/height (#12117)", 4, function() {
+test( "Animate properly sets overflow hidden when animating width/height (#12117)", 8, function() {
jQuery.each( [ "height", "width" ], function( _, prop ) {
jQuery.each( [ 100, 0 ], function( _, value ) {
- var div = jQuery("<div>"),
+ var div = jQuery("<div>").css( "overflow", "auto" ),
props = {};
props[ prop ] = value;
div.animate( props, 1 );
equal( div.css( "overflow" ), "hidden",
"overflow: hidden set when animating " + prop + " to " + value );
div.stop();
+ equal( div.css( "overflow" ), "auto",
+ "overflow: auto restored after animating " + prop + " to " + value );
});
});
});