mirror of
https://github.com/jquery/jquery.git
synced 2026-02-01 11:55:22 -05:00
Ajax: Account for Android 2.3 not firing window.onerror on script errors
Android 2.3 doesn't fire the window.onerror handler, just accept the reality
there and skip the test.
(cherry-picked from 6044fb6a73)
Refs gh-1573
Refs gh-1786
Refs jquery/jquery.com#108
Closes gh-2458
This commit is contained in:
committed by
Michał Gołębiowski
parent
d176001e6e
commit
b3eb2a13cd
@@ -1485,6 +1485,15 @@ module( "ajax", {
|
||||
});
|
||||
|
||||
asyncTest( "#11743 - jQuery.ajax() - script, throws exception", 1, function() {
|
||||
// Support: Android 2.3 only
|
||||
// Android 2.3 doesn't fire the window.onerror handler, just accept the reality there.
|
||||
if ( /android 2\.3/i.test( navigator.userAgent ) ) {
|
||||
ok( true, "Test skipped, Android 2.3 doesn't fire window.onerror for " +
|
||||
"errors in dynamically included scripts" );
|
||||
start();
|
||||
return;
|
||||
}
|
||||
|
||||
var onerror = window.onerror;
|
||||
window.onerror = function() {
|
||||
ok( true, "Exception thrown" );
|
||||
|
||||
@@ -2304,6 +2304,16 @@ test( "Ensure oldIE creates a new set on appendTo (#8894)", function() {
|
||||
});
|
||||
|
||||
asyncTest( "html() - script exceptions bubble (#11743)", 2, function() {
|
||||
// Support: Android 2.3 only
|
||||
// Android 2.3 doesn't fire the window.onerror handler, just accept the reality there.
|
||||
if ( /android 2\.3/i.test( navigator.userAgent ) ) {
|
||||
ok( true, "Test skipped, Android 2.3 doesn't fire window.onerror for " +
|
||||
"errors in dynamically included scripts" );
|
||||
ok( true, "Test skipped, Android 2.3 doesn't fire window.onerror for " +
|
||||
"errors in dynamically included scripts" );
|
||||
start();
|
||||
return;
|
||||
}
|
||||
|
||||
var onerror = window.onerror;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user