X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Ffx%2FfxTest.js;h=1f9e674a163ea274a874d6d07539f549481809e5;hb=7d02f06e036f6a42ccd2c276e9f00a7cd35dc74a;hp=dfb9157b3e8df459c8189897234a623cc946d46d;hpb=80a149b82831defa1a9f724801daefda0a8c5685;p=jquery.git diff --git a/src/fx/fxTest.js b/src/fx/fxTest.js index dfb9157..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"); @@ -196,7 +219,7 @@ jQuery.each( from, function(fn, f){ if ( t_h == "show" ) { var old_h = jQuery.curCSS(this, "height"); - $(elem).append("
Some more text
and some more..."); + $(elem).append("
Some more text
and some more..."); ok(old_h != jQuery.css(this, "height" ), "Make sure height is auto."); } @@ -281,4 +304,4 @@ function makeTest( text ){ return elem; } -makeTest.id = 1; \ No newline at end of file +makeTest.id = 1;