aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorOleg Gaidarenko <markelog@gmail.com>2015-12-22 18:05:38 +0300
committerOleg Gaidarenko <markelog@gmail.com>2015-12-22 18:05:38 +0300
commita769a0105e6f3f614a7fd7f4138885dfb19b8d46 (patch)
treec86fe46603c2755fa1b8f2883034e56896010b9f /test/unit
parent0b5e8dba05b59f218dfdf8d226076bf912f41ff2 (diff)
downloadjquery-a769a0105e6f3f614a7fd7f4138885dfb19b8d46.tar.gz
jquery-a769a0105e6f3f614a7fd7f4138885dfb19b8d46.zip
Revert "Effects: Improve raf logic"
This reverts commit 9dc29a2b130e6bbcdbcaf8fdc1433a41e6b7a585.
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/effects.js103
1 files changed, 0 insertions, 103 deletions
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;
-});
-
})();