Fix #11736. Remove deprecated Deferred.isResolved/isRejected.

This commit is contained in:
Dave Methvin 2012-05-10 23:45:14 -04:00
parent fe88534b29
commit c5fda2945c
2 changed files with 1 additions and 6 deletions

View File

@ -73,9 +73,6 @@ jQuery.extend({
// [ reject_list | resolve_list ].disable; progress_list.lock // [ reject_list | resolve_list ].disable; progress_list.lock
}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].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 // deferred[ resolve | reject | notify ] = list.fire

View File

@ -8,7 +8,7 @@ jQuery.each( [ "", " - new operator" ], function( _, withNew ) {
test("jQuery.Deferred" + withNew, function() { test("jQuery.Deferred" + withNew, function() {
expect( 23 ); expect( 21 );
var defer = createDeferred(); var defer = createDeferred();
@ -16,7 +16,6 @@ jQuery.each( [ "", " - new operator" ], function( _, withNew ) {
createDeferred().resolve().done(function() { createDeferred().resolve().done(function() {
ok( true , "Success on resolve" ); ok( true , "Success on resolve" );
ok( this.isResolved(), "Deferred is resolved" );
strictEqual( this.state(), "resolved", "Deferred is resolved (state)" ); strictEqual( this.state(), "resolved", "Deferred is resolved (state)" );
}).fail(function() { }).fail(function() {
ok( false , "Error on resolve" ); ok( false , "Error on resolve" );
@ -28,7 +27,6 @@ jQuery.each( [ "", " - new operator" ], function( _, withNew ) {
ok( false , "Success on reject" ); ok( false , "Success on reject" );
}).fail(function() { }).fail(function() {
ok( true , "Error on reject" ); ok( true , "Error on reject" );
ok( this.isRejected(), "Deferred is rejected" );
strictEqual( this.state(), "rejected", "Deferred is rejected (state)" ); strictEqual( this.state(), "rejected", "Deferred is rejected (state)" );
}).always(function() { }).always(function() {
ok( true , "Always callback on reject" ); ok( true , "Always callback on reject" );