mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
2.0: reduced xhr transport
This commit is contained in:
@@ -1429,24 +1429,26 @@ module( "ajax", {
|
||||
}
|
||||
});
|
||||
|
||||
test( "#11743 - jQuery.ajax() - script, throws exception", 1, function() {
|
||||
raises(function() {
|
||||
jQuery.ajax({
|
||||
url: "data/badjson.js",
|
||||
dataType: "script",
|
||||
throws: true,
|
||||
// TODO find a way to test this asynchronously, too
|
||||
async: false,
|
||||
// Global events get confused by the exception
|
||||
global: false,
|
||||
success: function() {
|
||||
ok( false, "Success." );
|
||||
},
|
||||
error: function() {
|
||||
ok( false, "Error." );
|
||||
}
|
||||
});
|
||||
}, "exception bubbled" );
|
||||
asyncTest( "#11743 - jQuery.ajax() - script, throws exception", 1, function() {
|
||||
var onerror = window.onerror;
|
||||
window.onerror = function() {
|
||||
ok( true, "Exception thrown" );
|
||||
window.onerror = onerror;
|
||||
start();
|
||||
};
|
||||
jQuery.ajax({
|
||||
url: "data/badjson.js",
|
||||
dataType: "script",
|
||||
throws: true,
|
||||
// Global events get confused by the exception
|
||||
global: false,
|
||||
success: function() {
|
||||
ok( false, "Success." );
|
||||
},
|
||||
error: function() {
|
||||
ok( false, "Error." );
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
jQuery.each( [ "method", "type" ], function( _, globalOption ) {
|
||||
|
||||
Reference in New Issue
Block a user