+test("jQuery.ajax() - textStatus and errorThrown values", function() {
+
+ var nb = 3;
+
+ expect( 2 * nb );
+ stop();
+
+ function startN() {
+ if ( !( --nb ) ) {
+ start();
+ }
+ }
+
+ jQuery.ajax({
+ url: url("data/nonExistingURL"),
+ error: function( _ , textStatus , errorThrown ){
+ strictEqual( textStatus, "error", "textStatus is 'error' for 404" );
+ strictEqual( errorThrown, "Not Found", "errorThrown is 'Not Found' for 404");
+ startN();
+ }
+ });
+
+ jQuery.ajax({
+ url: url("data/name.php?wait=5"),
+ error: function( _ , textStatus , errorThrown ){
+ strictEqual( textStatus, "abort", "textStatus is 'abort' for abort" );
+ strictEqual( errorThrown, "abort", "errorThrown is 'abort' for abort");
+ startN();
+ }
+ }).abort();
+
+ jQuery.ajax({
+ url: url("data/name.php?wait=5"),
+ error: function( _ , textStatus , errorThrown ){
+ strictEqual( textStatus, "mystatus", "textStatus is 'mystatus' for abort('mystatus')" );
+ strictEqual( errorThrown, "mystatus", "errorThrown is 'mystatus' for abort('mystatus')");
+ startN();
+ }
+ }).abort( "mystatus" );
+});
+