mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Ajax: don’t test jQuery.ajax() on beforeunload in Chrome 31
Chrome 31 doesn't fire Ajax requests in beforeunload event handler.
There is no way for us to workaround it and it's been fixed in Chrome 32
so let's just blacklist Chrome 31 as long as it's in TestSwarm.
See https://code.google.com/p/chromium/issues/detail?id=321241
(cherry-picked from fd0bce0758
)
This commit is contained in:
parent
e2022ddeac
commit
c536e7e19e
@ -1575,10 +1575,17 @@ module( "ajax", {
|
||||
}
|
||||
} );
|
||||
|
||||
testIframeWithCallback( "#14379 - jQuery.ajax() on unload", "ajax/onunload.html", function( status ) {
|
||||
expect( 1 );
|
||||
strictEqual( status, "success", "Request completed" );
|
||||
});
|
||||
// Support: Chrome 31.
|
||||
// Chrome 31 doesn't fire Ajax requests in beforeunload event handler.
|
||||
// There is no way for us to workaround it and it's been fixed in Chrome 32
|
||||
// so let's just blacklist Chrome 31 as long as it's in TestSwarm.
|
||||
// See https://code.google.com/p/chromium/issues/detail?id=321241
|
||||
if ( navigator.userAgent.indexOf( " Chrome/31." ) === -1 ) {
|
||||
testIframeWithCallback( "#14379 - jQuery.ajax() on unload", "ajax/onunload.html", function( status ) {
|
||||
expect( 1 );
|
||||
strictEqual( status, "success", "Request completed" );
|
||||
});
|
||||
}
|
||||
|
||||
//----------- jQuery.ajaxPrefilter()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user