aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/effects/effects_core.js
diff options
context:
space:
mode:
authortomykaira <tomykaira@gmail.com>2011-06-09 20:36:48 -0500
committergnarf <gnarf@gnarf.net>2011-06-09 20:38:09 -0500
commit2c8151848d191ad9ba53c0ee86b14aefe4288f67 (patch)
tree43e306d0a16a06772f9b6616e18b539a09de13e3 /tests/unit/effects/effects_core.js
parent19dcac2129a2b39a24989835c1c732fa630bdefd (diff)
downloadjquery-ui-2c8151848d191ad9ba53c0ee86b14aefe4288f67.tar.gz
jquery-ui-2c8151848d191ad9ba53c0ee86b14aefe4288f67.zip
effects.core: Convert elements height/width to px and restore after animation in all effects. Fixed #5245 - Relative width elements break when wrapped for effects
Diffstat (limited to 'tests/unit/effects/effects_core.js')
-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 ed9fbf9ba..4c685ebb6 100644
--- a/tests/unit/effects/effects_core.js
+++ b/tests/unit/effects/effects_core.js
@@ -54,6 +54,21 @@ $.each( $.effects.effect, function( effect ) {
start();
}));
});
+
+ asyncTest( "relative width & height - properties are preserved", function() {
+ var test = $("div.relWidth.relHeight"),
+ width = test.width(), height = test.height(),
+ cssWidth = test[0].style.width, cssHeight = test[0].style.height;
+
+ expect( 4 );
+ test.toggle( effect, minDuration, function() {
+ equal( test[0].style.width, cssWidth, "Inline CSS Width has been reset after animation ended" );
+ equal( test[0].style.height, cssHeight, "Inline CSS Height has been rest after animation ended" );
+ start();
+ });
+ equal( test.width(), width, "Width is the same px after animation started" );
+ equal( test.height(), height, "Height is the same px after animation started" );
+ });
});
module("animateClass");