Tests: Disable native abort test in Android 4.0

The test works on its own when checked manually but mysteriously fails in
TestSwarm only in Android 4.0. Let's just disable it there.

Closes gh-3968
This commit is contained in:
Michał Gołębiowski-Owczarek 2018-02-12 19:08:36 +01:00 committed by GitHub
parent 294a369881
commit 56742491bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -505,24 +505,26 @@ QUnit.module( "ajax", {
}; };
} ); } );
ajaxTest( "jQuery.ajax() - native abort", 2, function( assert ) { if ( !/android 4\.0/i.test( navigator.userAgent ) ) {
return { ajaxTest( "jQuery.ajax() - native abort", 2, function( assert ) {
url: url( "mock.php?action=wait&wait=1" ), return {
xhr: function() { url: url( "mock.php?action=wait&wait=1" ),
var xhr = new window.XMLHttpRequest(); xhr: function() {
setTimeout( function() { var xhr = new window.XMLHttpRequest();
xhr.abort(); setTimeout( function() {
}, 100 ); xhr.abort();
return xhr; }, 100 );
}, return xhr;
error: function( xhr, msg ) { },
assert.strictEqual( msg, "error", "Native abort triggers error callback" ); error: function( xhr, msg ) {
}, assert.strictEqual( msg, "error", "Native abort triggers error callback" );
complete: function() { },
assert.ok( true, "complete" ); complete: function() {
} assert.ok( true, "complete" );
}; }
} ); };
} );
}
// Support: Android <= 4.0 - 4.3 only // Support: Android <= 4.0 - 4.3 only
// Android 4.0-4.3 does not have ontimeout on an xhr // Android 4.0-4.3 does not have ontimeout on an xhr