Created
May 7, 2011 21:16
-
-
Save gnarf/960850 to your computer and use it in GitHub Desktop.
Unit test for bug #9074
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test( "animate properties missing px w/ opacity as last (#9074)", 2, function() { | |
expect( 6 ); | |
stop(); | |
var div = jQuery( "<div style='position: absolute; margin-left: 0; left: 0px;'></div>" ) | |
.appendTo( "#qunit-fixture" ); | |
function cssInt( prop ) { | |
return parseInt( div.css( prop ), 10 ); | |
} | |
equal( cssInt( "marginLeft" ), 0, "Margin left is 0" ); | |
equal( cssInt( "left" ), 0, "Left is 0" ); | |
div.animate({ | |
left: 200, | |
marginLeft: 200, | |
opacity: 0 | |
}, 1000); | |
setTimeout(function() { | |
var ml = cssInt( "marginLeft" ), | |
l = cssInt( "left" ); | |
notEqual( ml, 0, "Margin left is not 0 after partial animate" ); | |
notEqual( ml, 200, "Margin left is not 200 after partial animate" ); | |
notEqual( l, 0, "Left is not 0 after partial animate" ); | |
notEqual( l, 200, "Left is not 200 after partial animate" ); | |
div.stop().remove(); | |
start(); | |
}, 100); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment