X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=blobdiff_plain;f=test%2Funit%2Fajax.js;h=49196cbbb17cae6b40642e12a0856dd627006e61;hp=f5b71da398ca1cbb3b6ce825102da061503a303d;hb=8ab23aec2c333834a6e442fa15b73125ba857afe;hpb=d9cb69873c0be7cb2f65d24deeb6a01fada0661b diff --git a/test/unit/ajax.js b/test/unit/ajax.js index f5b71da..49196cb 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -1865,25 +1865,19 @@ test("jQuery ajax - failing cross-domain", function() { var i = 2; - if ( jQuery.ajax({ + jQuery.ajax({ url: 'http://somewebsitethatdoesnotexist-67864863574657654.com', success: function(){ ok( false , "success" ); }, error: function(xhr,_,e){ ok( true , "file not found: " + xhr.status + " => " + e ); }, complete: function() { if ( ! --i ) start(); } - }) === false ) { - ok( true , "no transport" ); - if ( ! --i ) start(); - } + }); - if ( jQuery.ajax({ + jQuery.ajax({ url: 'http://www.google.com', success: function(){ ok( false , "success" ); }, error: function(xhr,_,e){ ok( true , "access denied: " + xhr.status + " => " + e ); }, complete: function() { if ( ! --i ) start(); } - }) === false ) { - ok( true , "no transport" ); - if ( ! --i ) start(); - } + }); }); @@ -1937,7 +1931,7 @@ test( "jQuery.ajax - statusCode" , function() { 404: function() { ok( ! isSuccess , name ); } - } + }; } jQuery.each( {