aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorey Frang <gnarf@gnarf.net>2011-06-23 05:29:09 -0500
committerCorey Frang <gnarf@gnarf.net>2011-06-23 05:29:09 -0500
commita89ff4098a6149817061a752ec3755127f554407 (patch)
treee501347e4efe4a263b74072ea0e095fa53b23816
parent5f0a2f01c4609315ab66158191d3f9bd420f827f (diff)
downloadjquery-ui-a89ff4098a6149817061a752ec3755127f554407.tar.gz
jquery-ui-a89ff4098a6149817061a752ec3755127f554407.zip
Unit Tests: Adding a unit test to make sure .stop( true, true ) clears the inline styles when using animateClass - Fixed #3928 - Class-Animation: Please add a clearInlineStyle-Option
-rw-r--r--tests/unit/effects/effects_core.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/unit/effects/effects_core.js b/tests/unit/effects/effects_core.js
index 4c685ebb6..fd6b4d378 100644
--- a/tests/unit/effects/effects_core.js
+++ b/tests/unit/effects/effects_core.js
@@ -123,4 +123,19 @@ asyncTest( "animateClass works with children", function() {
}});
});
+asyncTest( "animateClass clears style properties when stopped", function() {
+ var test = $("div.animateClass"),
+ style = test[0].style,
+ orig = style.cssText;
+
+ expect( 2 );
+
+ test.addClass( "testChangeBackground", duration );
+ notEqual( orig, style.cssText, "cssText is the not the same after starting animation" );
+
+ test.stop( true, true );
+ equal( orig, style.cssText, "cssText is the same after stopping animation midway" );
+ start();
+});
+
})(jQuery);