diff options
author | Scott González <scott.gonzalez@gmail.com> | 2015-04-07 10:55:52 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2015-04-09 09:27:00 -0400 |
commit | bde431bb449b1d957d4e0b736111ff342f2a919d (patch) | |
tree | 27fd40037c30dbff8ef3b6113e90817ab96b53bf /tests/unit/effects/effects_scale.js | |
parent | dc4b015a8b9acdb5bff2d5dd89737b3d8b64097f (diff) | |
download | jquery-ui-bde431bb449b1d957d4e0b736111ff342f2a919d.tar.gz jquery-ui-bde431bb449b1d957d4e0b736111ff342f2a919d.zip |
Tests: Rename files
Ref gh-1528
Diffstat (limited to 'tests/unit/effects/effects_scale.js')
-rw-r--r-- | tests/unit/effects/effects_scale.js | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/tests/unit/effects/effects_scale.js b/tests/unit/effects/effects_scale.js deleted file mode 100644 index 186daf09f..000000000 --- a/tests/unit/effects/effects_scale.js +++ /dev/null @@ -1,72 +0,0 @@ -define( [ - "jquery", - "ui/effect-scale" -], function( $ ) { - -module( "effect.scale: Scale" ); - -function run( position, v, h, vo, ho ) { - var desc = "End Position Correct: " + position + " (" + v + "," + h + ") - origin: (" + vo + "," + ho + ")"; - asyncTest( desc, function( assert ) { - expect( 2 ); - function complete() { - assert.close( parseInt( test.css( h ), 10 ), target[ h ], 1, "Horizontal Position Correct " + desc ); - assert.close( parseInt( test.css( v ), 10 ), target[ v ], 1, "Vertical Position Correct " + desc ); - start(); - } - var test = $( ".testScale" ), - css = { - position: position - }, - effect = { - effect: "scale", - mode: "effect", - percent: 200, - origin: [ vo, ho ], - complete: complete, - duration: 1 - }, - target = {}, - relative = position === "relative"; - - css[ h ] = 33; - css[ v ] = 33; - target[ h ] = h === ho ? css[ h ] : ho === "center" ? css[ h ] - 35 : css[ h ] - 70; - target[ v ] = v === vo ? css[ v ] : vo === "middle" ? css[ v ] - 35 : css[ v ] - 70; - if ( relative && h === "right" ) { - target[ h ] += 70; - } - if ( relative && v === "bottom" ) { - target[ v ] += 70; - } - test.css( css ); - test.effect( effect ); - }); -} - -function suite( position ) { - run( position, "top", "left", "top", "left" ); - run( position, "top", "left", "middle", "center" ); - run( position, "top", "left", "bottom", "right" ); - /* Firefox is currently not capable of supporting detection of bottom and right.... - run( position, "bottom", "right", "top", "left" ); - run( position, "bottom", "right", "middle", "center" ); - run( position, "bottom", "right", "bottom", "right" ); - */ -} - -$(function() { - suite( "absolute" ); - suite( "relative" ); - var fixedElem = $( "<div>" ) - .css({ - position: "fixed", - top: 10 - }) - .appendTo( "body" ); - if ( fixedElem.offset().top === 10 ) { - suite( "fixed" ); - } -}); - -} ); |