+ url: "data/jsonp.php",
+ dataType: "jsonp",
+ crossDomain: crossDomain,
+ jsonpCallback: "functionToCleanUp",
+ success: function(data){
+ ok( data.data, "JSON results returned (GET, custom callback name to be cleaned up)" );
+ strictEqual( window.functionToCleanUp, undefined, "Callback was removed (GET, custom callback name to be cleaned up)" );
+ plus();
+ var xhr;
+ jQuery.ajax({
+ url: "data/jsonp.php",
+ dataType: "jsonp",
+ crossDomain: crossDomain,
+ jsonpCallback: "functionToCleanUp",
+ beforeSend: function( jqXHR ) {
+ xhr = jqXHR;
+ return false;
+ }
+ });
+ xhr.error(function() {
+ ok( true, "Ajax error JSON (GET, custom callback name to be cleaned up)" );
+ strictEqual( window.functionToCleanUp, undefined, "Callback was removed after early abort (GET, custom callback name to be cleaned up)" );
+ plus();
+ });
+ },
+ error: function(data){
+ ok( false, "Ajax error JSON (GET, custom callback name to be cleaned up)" );
+ plus();
+ }
+ });
+
+ jQuery.ajax({