Commit 6ba56388 authored by jaubourg's avatar jaubourg

fixes problematic JSONP test (gotta learn to count)

parent 72aada0a
...@@ -1519,12 +1519,12 @@ if ( jQuery.ajax && ( !isLocal || hasPHP ) ) { ...@@ -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 ); expect( 9 );
var count = 0; var count = 0;
function plus() { function plus() {
if ( ++count === 4 ) { if ( ++count === 7 ) {
start(); start();
} }
} }
...@@ -1543,7 +1543,7 @@ if ( jQuery.ajax && ( !isLocal || hasPHP ) ) { ...@@ -1543,7 +1543,7 @@ if ( jQuery.ajax && ( !isLocal || hasPHP ) ) {
plus(); plus();
} }
}); });
window["jsonpResults"] = function( data ) { window["jsonpResults"] = function( data ) {
ok( data["data"], "JSON results returned (GET, custom callback function)" ); ok( data["data"], "JSON results returned (GET, custom callback function)" );
window["jsonpResults"] = undefined; window["jsonpResults"] = undefined;
...@@ -1594,6 +1594,7 @@ if ( jQuery.ajax && ( !isLocal || hasPHP ) ) { ...@@ -1594,6 +1594,7 @@ if ( jQuery.ajax && ( !isLocal || hasPHP ) ) {
error: function( data ) { error: function( data ) {
ok( false, "Ajax error JSON (GET, custom callback name to be cleaned up)" ); ok( false, "Ajax error JSON (GET, custom callback name to be cleaned up)" );
plus(); plus();
plus();
} }
}); });
...@@ -1617,7 +1618,6 @@ if ( jQuery.ajax && ( !isLocal || hasPHP ) ) { ...@@ -1617,7 +1618,6 @@ if ( jQuery.ajax && ( !isLocal || hasPHP ) ) {
} }
}); });
}); });
*/
asyncTest( "jQuery.ajax() - JSONP, Callback in data, " + label, function() { asyncTest( "jQuery.ajax() - JSONP, Callback in data, " + label, function() {
expect( 2 ); expect( 2 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment