From a769a0105e6f3f614a7fd7f4138885dfb19b8d46 Mon Sep 17 00:00:00 2001 From: Oleg Gaidarenko Date: Tue, 22 Dec 2015 18:05:38 +0300 Subject: Revert "Effects: Improve raf logic" This reverts commit 9dc29a2b130e6bbcdbcaf8fdc1433a41e6b7a585. --- test/unit/effects.js | 103 --------------------------------------------------- 1 file changed, 103 deletions(-) (limited to 'test/unit') diff --git a/test/unit/effects.js b/test/unit/effects.js index 9f4dcea1d..2e65a62ed 100644 --- a/test/unit/effects.js +++ b/test/unit/effects.js @@ -2206,107 +2206,4 @@ test( "Respect display value on inline elements (#14824)", 2, function() { clock.tick( 800 ); }); -test( "Animation should go to its end state if document.hidden = true", 1, function() { - var height; - if ( Object.defineProperty ) { - - // Can't rewrite document.hidden property if its host property - try { - Object.defineProperty( document, "hidden", { - get: function() { - return true; - } - }); - } catch ( e ) {} - } else { - document.hidden = true; - } - - if ( document.hidden ) { - height = jQuery( "#qunit-fixture" ).animate({ height: 500 } ).height(); - - equal( height, 500, "Animation should happen immediately if document.hidden = true" ); - jQuery( document ).removeProp( "hidden" ); - - } else { - ok( true, "Can't run the test since we can't reproduce correct environment for it" ); - } -}); - -test( "jQuery.easing._default (gh-2218)", function() { - expect( 2 ); - - jQuery( "#foo" ) - .animate( { width: "5px" }, { - duration: 5, - start: function( anim ) { - equal( anim.opts.easing, jQuery.easing._default, - "anim.opts.easing should be equal to jQuery.easing._default when the easing argument is not given" ); - } - }) - .animate( { height: "5px" }, { - duration: 5, - easing: "linear", - start: function( anim ) { - equal( anim.opts.easing, "linear", - "anim.opts.easing should be equal to the easing argument" ); - } - }) - .stop(); - - this.clock.tick( 25 ); -}); - -test( "jQuery.easing._default in Animation (gh-2218", function() { - expect( 3 ); - - var animation, - defaultEasing = jQuery.easing._default, - called = false, - testObject = { "width": 100 }, - testDest = { "width": 200 }; - - jQuery.easing.custom = function( p ) { - called = true; - return p; - }; - jQuery.easing._default = "custom"; - - animation = jQuery.Animation( testObject, testDest, { "duration": 1 } ); - animation.done( function() { - equal( testObject.width, testDest.width, "Animated width" ); - ok( called, "Custom jQuery.easing._default called" ); - strictEqual( animation.opts.easing, "custom", - "Animation used custom jQuery.easing._default" ); - jQuery.easing._default = defaultEasing; - delete jQuery.easing.custom; - }); - - this.clock.tick( 10 ); -}); - -test( "jQuery.easing._default in Tween (gh-2218)", function() { - expect( 3 ); - - var tween, - defaultEasing = jQuery.easing._default, - called = false, - testObject = { "width": 100 }; - - jQuery.easing.custom = function( p ) { - called = true; - return p; - }; - jQuery.easing._default = "custom"; - - tween = jQuery.Tween( testObject, { "duration": 1 }, "width", 200 ); - tween.run( 1 ); - equal( testObject.width, 200, "Animated width" ); - ok( called, "Custom jQuery.easing._default called" ); - strictEqual( tween.easing, "custom", - "Animation used custom jQuery.easing._default" ); - jQuery.easing._default = defaultEasing; - delete jQuery.easing.custom; -}); - })(); -- cgit v1.2.3