Skip to content
Permalink
Browse files

fixes problematic JSONP test (gotta learn to count)

  • Loading branch information...
jaubourg committed Oct 16, 2012
1 parent 72aada0 commit 6ba563887a572efc25e60623b5e1301864cff303
Showing with 4 additions and 4 deletions.
  1. +4 −4 test/unit/ajax.js
@@ -1519,12 +1519,12 @@ if ( jQuery.ajax && ( !isLocal || hasPHP ) ) {
});
});

/* asyncTest( "jQuery.ajax() - JSONP, Explicit jsonp/Callback param " + label, function() {
asyncTest( "jQuery.ajax() - JSONP, Explicit jsonp/Callback param " + label, function() {
expect( 9 );

var count = 0;
function plus() {
if ( ++count === 4 ) {
if ( ++count === 7 ) {
start();
}
}
@@ -1543,7 +1543,7 @@ if ( jQuery.ajax && ( !isLocal || hasPHP ) ) {
plus();
}
});
window["jsonpResults"] = function( data ) {
ok( data["data"], "JSON results returned (GET, custom callback function)" );
window["jsonpResults"] = undefined;
@@ -1594,6 +1594,7 @@ if ( jQuery.ajax && ( !isLocal || hasPHP ) ) {
error: function( data ) {
ok( false, "Ajax error JSON (GET, custom callback name to be cleaned up)" );
plus();
plus();
}
});

@@ -1617,7 +1618,6 @@ if ( jQuery.ajax && ( !isLocal || hasPHP ) ) {
}
});
});
*/

asyncTest( "jQuery.ajax() - JSONP, Callback in data, " + label, function() {
expect( 2 );

0 comments on commit 6ba5638

Please sign in to comment.
You can’t perform that action at this time.