X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=test%2Funit%2Fajax.js;h=ce257f88a84a43e2114c340a5c3cbfefe082fd2b;hb=dcf0fa5048ef2379d551f29ffa29b14ec5ee09d5;hp=0464c7b5fbb9b72f31d144f2bcc61ee3fdcc2ab4;hpb=8c8f685a911c811e9b998958dd453a6a2b9d5940;p=jquery.git diff --git a/test/unit/ajax.js b/test/unit/ajax.js index 0464c7b..ce257f8 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -14,30 +14,28 @@ test("jQuery.ajax() - success callbacks", function() { stop(); - setTimeout(function(){ - jQuery('#foo').ajaxStart(function(){ - ok( true, "ajaxStart" ); - }).ajaxStop(function(){ - ok( true, "ajaxStop" ); - start(); - }).ajaxSend(function(){ - ok( true, "ajaxSend" ); - }).ajaxComplete(function(){ - ok( true, "ajaxComplete" ); - }).ajaxError(function(){ - ok( false, "ajaxError" ); - }).ajaxSuccess(function(){ - ok( true, "ajaxSuccess" ); - }); + jQuery('#foo').ajaxStart(function(){ + ok( true, "ajaxStart" ); + }).ajaxStop(function(){ + ok( true, "ajaxStop" ); + start(); + }).ajaxSend(function(){ + ok( true, "ajaxSend" ); + }).ajaxComplete(function(){ + ok( true, "ajaxComplete" ); + }).ajaxError(function(){ + ok( false, "ajaxError" ); + }).ajaxSuccess(function(){ + ok( true, "ajaxSuccess" ); + }); - jQuery.ajax({ - url: url("data/name.html"), - beforeSend: function(){ ok(true, "beforeSend"); }, - success: function(){ ok(true, "success"); }, - error: function(){ ok(false, "error"); }, - complete: function(){ ok(true, "complete"); } - }); - }, 13); + jQuery.ajax({ + url: url("data/name.html"), + beforeSend: function(){ ok(true, "beforeSend"); }, + success: function(){ ok(true, "success"); }, + error: function(){ ok(false, "error"); }, + complete: function(){ ok(true, "complete"); } + }); }); test("jQuery.ajax() - error callbacks", function() {