mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Ajax: Fix for request aborted in ajaxSend
Fixes gh-1775 Close gh-1619
This commit is contained in:
@@ -435,6 +435,23 @@ module( "ajax", {
|
||||
};
|
||||
});
|
||||
|
||||
ajaxTest( "#15160 - jQuery.ajax() - request manually aborted in ajaxSend", 3, {
|
||||
setup: function() {
|
||||
jQuery( document ).on( "ajaxSend", function( e, jqXHR ) {
|
||||
jqXHR.abort();
|
||||
});
|
||||
|
||||
jQuery( document ).on( "ajaxError ajaxComplete", function( e, jqXHR ) {
|
||||
equal( jqXHR.statusText, "abort", "jqXHR.statusText equals abort on global ajaxComplete and ajaxError events" );
|
||||
});
|
||||
},
|
||||
url: url("data/name.html"),
|
||||
error: true,
|
||||
complete: function() {
|
||||
ok( true, "complete" );
|
||||
}
|
||||
});
|
||||
|
||||
ajaxTest( "jQuery.ajax() - context modification", 1, {
|
||||
url: url("data/name.html"),
|
||||
context: {},
|
||||
|
||||
Reference in New Issue
Block a user