X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Ffx%2FfxTest.js;fp=src%2Ffx%2FfxTest.js;h=1f9e674a163ea274a874d6d07539f549481809e5;hb=1ce8006d480ebd64350983a17be1cc2e3f043958;hp=3c0d57db65ed426856e8d7d4ea33d82ce7455150;hpb=d5bb0e317988965306b1ccb395fafc4554aba49c;p=jquery.git diff --git a/src/fx/fxTest.js b/src/fx/fxTest.js index 3c0d57d..1f9e674 100644 --- a/src/fx/fxTest.js +++ b/src/fx/fxTest.js @@ -11,6 +11,29 @@ test("animate(Hash, Object, Function)", function() { }); }); +test("stop()", function() { + expect(3); + stop(); + reset(); + + var foo = $("#foo")[0]; + var h = foo.style.height; + + $("#foo").slideUp(1000); + setTimeout(function(){ + var nh = foo.style.height; + ok( nh != h, "An animation occurred " + nh + " " + h ); + $("#foo").stop(); + + nh = foo.style.height; + ok( nh != h, "Stop didn't reset the animation " + nh + " " + h ); + setTimeout(function(){ + equals( nh, foo.style.height, "The animation didn't continue" ); + start(); + }, 100); + }, 100); +}); + test("toggle()", function() { expect(3); var x = $("#foo");