]> source.dussan.org Git - jquery.git/commitdiff
Fix #11736. Remove deprecated Deferred.isResolved/isRejected.
authorDave Methvin <dave.methvin@gmail.com>
Fri, 11 May 2012 03:45:14 +0000 (23:45 -0400)
committerDave Methvin <dave.methvin@gmail.com>
Fri, 11 May 2012 19:02:18 +0000 (15:02 -0400)
src/deferred.js
test/unit/deferred.js

index f509a9acacfba38108f890c6b94afbe9b6ea5539..a06fe21938dd8b9a27a3e1cde9bf8b7a52989dfc 100644 (file)
@@ -73,9 +73,6 @@ jQuery.extend({
 
                                // [ reject_list | resolve_list ].disable; progress_list.lock
                                }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
-
-                               // <DEPRECATED> [ isResolved | isRejected ] = [ resolve_list | reject_list ].fired
-                               promise[ "isR" + stateString.substr( 1 ) ] = list.fired;
                        }
 
                        // deferred[ resolve | reject | notify ] = list.fire
index 7ff274d56ac6a0840384e323e40d8898925e71ea..710d221f08c4f9574931841047e25ac15e891427 100644 (file)
@@ -8,7 +8,7 @@ jQuery.each( [ "", " - new operator" ], function( _, withNew ) {
 
        test("jQuery.Deferred" + withNew, function() {
 
-               expect( 23 );
+               expect( 21 );
 
                var defer = createDeferred();
 
@@ -16,7 +16,6 @@ jQuery.each( [ "", " - new operator" ], function( _, withNew ) {
 
                createDeferred().resolve().done(function() {
                        ok( true , "Success on resolve" );
-                       ok( this.isResolved(), "Deferred is resolved" );
                        strictEqual( this.state(), "resolved", "Deferred is resolved (state)" );
                }).fail(function() {
                        ok( false , "Error on resolve" );
@@ -28,7 +27,6 @@ jQuery.each( [ "", " - new operator" ], function( _, withNew ) {
                        ok( false , "Success on reject" );
                }).fail(function() {
                        ok( true , "Error on reject" );
-                       ok( this.isRejected(), "Deferred is rejected" );
                        strictEqual( this.state(), "rejected", "Deferred is rejected (state)" );
                }).always(function() {
                        ok( true , "Always callback on reject" );