]> source.dussan.org Git - jquery.git/commitdiff
Fixes #8892: Adding unit test for #8892 - Actually fixed in 58ed62e
authorCorey Frang <gnarf@gnarf.net>
Fri, 11 May 2012 20:32:50 +0000 (15:32 -0500)
committerCorey Frang <gnarf@gnarf.net>
Fri, 11 May 2012 20:32:50 +0000 (15:32 -0500)
test/unit/effects.js

index 0fab3f5f2ae40bf9ca1308d16f18ec41d99369cd..59a3d362729b7d568c4c7e8171f941c15f2cfad5 100644 (file)
@@ -1495,3 +1495,17 @@ asyncTest( "Animate callbacks have correct context", 2, function() {
                start();
        });
 });
+
+asyncTest( "User supplied callback called after show when fx off (#8892)", 2, function() {
+       var foo = jQuery( "#foo" );
+       jQuery.fx.off = true;
+       foo.hide();
+       foo.fadeIn( 500, function() {
+               ok( jQuery( this ).is( ":visible" ), "Element is visible in callback" );
+               foo.fadeOut( 500, function() {
+                       ok( jQuery( this ).is( ":hidden" ), "Element is hidden in callback" );
+                       jQuery.fx.off = false;
+                       start();
+               });
+       });
+});