rem: error = function() { counter.error++ }, complete = function() { counter.complete++ };  $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success);  $.ajax({url: "data/name.php", success: success, error: error, complete: function() { ok( counter.error == 0, 'Check succesful request' ); ok( counter.success == 2, 'Check succesful request' ); ok( counter.complete == 3, 'Check succesful request' ); 
add: error = function() { counter.error++ }; $.ajaxTimeout(0); $.ajax({url: "data/name.php", global: false, success: success, error: error, complete: function() { ok( counter.error == 0, 'Check sucesful request without globals' ); ok( counter.success == 1, 'Check sucesful request without globals' ); ok( counter.complete == 0, 'Check sucesful request without globals' ); 
context: test("test global handlers - success", function() {	expect(6);	stop();	var counter = { complete: 0, success: 0, error: 0 },		success = function() { counter.success++ },		error = function() { counter.error++ },		complete = function() { counter.complete++ };	$('#foo').ajaxStart(complete).ajaxStop(complete).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success);	// start with successful test	$.ajax({url: "data/name.php", success: success, error: error, complete: function() {	  ok( counter.error == 0, 'Check succesful request' );	  ok( counter.success == 2, 'Check succesful request' );	  ok( counter.complete == 3, 'Check succesful request' );	  counter.error = counter.success = counter.complete = 0;	  $.ajaxTimeout(500);	  $.ajax({url: "data/name.php?wait=5", success: success, error: error, complete: function() {	    ok( counter.error == 2, 'Check failed request' );	    ok( counter.success == 0, 'Check failed request' );	    ok( counter.complete == 3, 'Check failed request' );	    start();	  }});	}});});
meta: 6056	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6056/ae58d24fd55e33b9977516988e696466fdaefa18/ajaxTest.js/clean/src/ajax/ajaxTest.js