mirror of
https://github.com/jquery/jquery.git
synced 2024-10-05 11:34:18 +00:00
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:
parent
294a369881
commit
56742491bd
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user