@@ -2206,107 +2206,4 @@ test( "Respect display value on inline elements (#14824)", 2, function() {
22062206 clock . tick ( 800 ) ;
22072207} ) ;
22082208
2209- test ( "Animation should go to its end state if document.hidden = true" , 1 , function ( ) {
2210- var height ;
2211- if ( Object . defineProperty ) {
2212-
2213- // Can't rewrite document.hidden property if its host property
2214- try {
2215- Object . defineProperty ( document , "hidden" , {
2216- get : function ( ) {
2217- return true ;
2218- }
2219- } ) ;
2220- } catch ( e ) { }
2221- } else {
2222- document . hidden = true ;
2223- }
2224-
2225- if ( document . hidden ) {
2226- height = jQuery ( "#qunit-fixture" ) . animate ( { height : 500 } ) . height ( ) ;
2227-
2228- equal ( height , 500 , "Animation should happen immediately if document.hidden = true" ) ;
2229- jQuery ( document ) . removeProp ( "hidden" ) ;
2230-
2231- } else {
2232- ok ( true , "Can't run the test since we can't reproduce correct environment for it" ) ;
2233- }
2234- } ) ;
2235-
2236- test ( "jQuery.easing._default (gh-2218)" , function ( ) {
2237- expect ( 2 ) ;
2238-
2239- jQuery ( "#foo" )
2240- . animate ( { width : "5px" } , {
2241- duration : 5 ,
2242- start : function ( anim ) {
2243- equal ( anim . opts . easing , jQuery . easing . _default ,
2244- "anim.opts.easing should be equal to jQuery.easing._default when the easing argument is not given" ) ;
2245- }
2246- } )
2247- . animate ( { height : "5px" } , {
2248- duration : 5 ,
2249- easing : "linear" ,
2250- start : function ( anim ) {
2251- equal ( anim . opts . easing , "linear" ,
2252- "anim.opts.easing should be equal to the easing argument" ) ;
2253- }
2254- } )
2255- . stop ( ) ;
2256-
2257- this . clock . tick ( 25 ) ;
2258- } ) ;
2259-
2260- test ( "jQuery.easing._default in Animation (gh-2218" , function ( ) {
2261- expect ( 3 ) ;
2262-
2263- var animation ,
2264- defaultEasing = jQuery . easing . _default ,
2265- called = false ,
2266- testObject = { "width" : 100 } ,
2267- testDest = { "width" : 200 } ;
2268-
2269- jQuery . easing . custom = function ( p ) {
2270- called = true ;
2271- return p ;
2272- } ;
2273- jQuery . easing . _default = "custom" ;
2274-
2275- animation = jQuery . Animation ( testObject , testDest , { "duration" : 1 } ) ;
2276- animation . done ( function ( ) {
2277- equal ( testObject . width , testDest . width , "Animated width" ) ;
2278- ok ( called , "Custom jQuery.easing._default called" ) ;
2279- strictEqual ( animation . opts . easing , "custom" ,
2280- "Animation used custom jQuery.easing._default" ) ;
2281- jQuery . easing . _default = defaultEasing ;
2282- delete jQuery . easing . custom ;
2283- } ) ;
2284-
2285- this . clock . tick ( 10 ) ;
2286- } ) ;
2287-
2288- test ( "jQuery.easing._default in Tween (gh-2218)" , function ( ) {
2289- expect ( 3 ) ;
2290-
2291- var tween ,
2292- defaultEasing = jQuery . easing . _default ,
2293- called = false ,
2294- testObject = { "width" : 100 } ;
2295-
2296- jQuery . easing . custom = function ( p ) {
2297- called = true ;
2298- return p ;
2299- } ;
2300- jQuery . easing . _default = "custom" ;
2301-
2302- tween = jQuery . Tween ( testObject , { "duration" : 1 } , "width" , 200 ) ;
2303- tween . run ( 1 ) ;
2304- equal ( testObject . width , 200 , "Animated width" ) ;
2305- ok ( called , "Custom jQuery.easing._default called" ) ;
2306- strictEqual ( tween . easing , "custom" ,
2307- "Animation used custom jQuery.easing._default" ) ;
2308- jQuery . easing . _default = defaultEasing ;
2309- delete jQuery . easing . custom ;
2310- } ) ;
2311-
23122209} ) ( ) ;
0 commit comments