Skip to content

Commit 0921c44

Browse files
committed
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. Refs gh-1573 Fixes gh-2457
1 parent dc8ba6a commit 0921c44

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/unit/ajax.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,6 +1440,15 @@ module( "ajax", {
14401440
});
14411441

14421442
asyncTest( "#11743 - jQuery.ajax() - script, throws exception", 1, function() {
1443+
// Support: Android 2.3 only
1444+
// Android 2.3 doesn't fire the window.onerror handler, just accept the reality there.
1445+
if ( /android 2\.3/i.test( navigator.userAgent ) ) {
1446+
ok( true, "Test skipped, Android 2.3 doesn't fire window.onerror for " +
1447+
"errors in dynamically included scripts" );
1448+
start();
1449+
return;
1450+
}
1451+
14431452
var onerror = window.onerror;
14441453
window.onerror = function() {
14451454
ok( true, "Exception thrown" );

0 commit comments

Comments
 (0)