From: Richard Gibson Date: Mon, 28 Oct 2013 21:40:13 +0000 (-0400) Subject: Fix #14379: AJAX requests on unload X-Git-Tag: 1.11.0-beta2~46 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=26705c6c5b52d527177de9cbbbc62d93bf7dbafb;p=jquery.git Fix #14379: AJAX requests on unload (cherry picked from commit f9d41ac641dcb5a93ba8a9027476b160d8f41111) Conflicts: src/ajax/xhr.js --- diff --git a/test/data/ajax/onunload.html b/test/data/ajax/onunload.html new file mode 100644 index 000000000..2c629f67d --- /dev/null +++ b/test/data/ajax/onunload.html @@ -0,0 +1,30 @@ + + + + + onunload ajax requests (#14379) + + + + + + + diff --git a/test/unit/ajax.js b/test/unit/ajax.js index 22fed363c..fee2d8a04 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -1565,6 +1565,11 @@ module( "ajax", { } } ); + testIframeWithCallback( "#14379 - jQuery.ajax() on unload", "ajax/onunload.html", function( status ) { + expect( 1 ); + strictEqual( status, "success", "Request completed" ); + }); + //----------- jQuery.ajaxPrefilter() ajaxTest( "jQuery.ajaxPrefilter() - abort", 1, {