diff options
Diffstat (limited to 'test/unit/ajax.js')
-rw-r--r-- | test/unit/ajax.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/unit/ajax.js b/test/unit/ajax.js index 07ff40783..4dc7b9d3a 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -527,6 +527,23 @@ QUnit.module( "ajax", { }; } ); + ajaxTest( "jQuery.ajax() - native timeout", 2, function( assert ) { + return { + url: url( "data/name.php?wait=1" ), + xhr: function() { + var xhr = new window.XMLHttpRequest(); + xhr.timeout = 1; + return xhr; + }, + error: function( xhr, msg ) { + assert.strictEqual( msg, "error", "Native timeout triggers error callback" ); + }, + complete: function() { + assert.ok( true, "complete" ); + } + }; + } ); + ajaxTest( "jQuery.ajax() - events with context", 12, function( assert ) { var context = document.createElement( "div" ); |