2 module( "effect.scale: Scale" );
4 function run( position, v, h, vo, ho ) {
5 var desc = "End Position Correct: " + position + " (" + v + "," + h + ") - origin: (" + vo + "," + ho + ")";
6 asyncTest( desc, function() {
9 equal( parseInt( test.css( h ), 10 ), target[ h ], "Horizontal Position Correct " + desc );
10 equal( parseInt( test.css( v ), 10 ), target[ v ], "Vertical Position Correct " + desc );
13 var test = $( ".testScale" ),
26 relative = position === "relative";
30 target[ h ] = h === ho ? css[ h ] : ho === "center" ? css[ h ] - 35 : css[ h ] - 70;
31 target[ v ] = v === vo ? css[ v ] : vo === "middle" ? css[ v ] - 35 : css[ v ] - 70;
32 if ( relative && h === "right" ) {
35 if ( relative && v === "bottom" ) {
39 test.effect( effect );
43 function suite( position ) {
44 run( position, "top", "left", "top", "left" );
45 run( position, "top", "left", "middle", "center" );
46 run( position, "top", "left", "bottom", "right" );
47 /* Firefox is currently not capable of supporting detection of bottom and right....
48 run( position, "bottom", "right", "top", "left" );
49 run( position, "bottom", "right", "middle", "center" );
50 run( position, "bottom", "right", "bottom", "right" );
57 var fixedElem = $( "<div>" )
63 if ( fixedElem.offset().top === 10 ) {