});
});
-});
+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);
+});
++
+ test("callbacks should fire in correct order (#9100)", function() {
+ stop();
+ var a = 1,
+ cb = 0,
+ $lis = jQuery("<p data-operation='*2'></p><p data-operation='^2'></p>").appendTo("#qunit-fixture")
+ // The test will always pass if no properties are animated or if the duration is 0
+ .animate({fontSize: 12}, 13, function() {
+ a *= jQuery(this).data("operation") === "*2" ? 2 : a;
+ cb++;
+ if ( cb === 2 ) {
+ equal( a, 4, "test value has been *2 and _then_ ^2");
+ start();
+ }
+ });
++});