rem: var counter = { complete: 0, success: 0, error: 0 }, success = function() { counter.success++ }, 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' ); counter.error = counter.success = counter.complete = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", global: false, success: success, error: error, complete: function() { ok( counter.error == 1, 'Check failed request without globals' ); ok( counter.success == 0, 'Check failed request without globals' ); ok( counter.complete == 0, 'Check failed request without globals' ); start(); }}); }}); 
add: $.get('data/dashboard.xml', function(xml) { var content = []; $('tab', xml).each(function() { content.push($(this).text()); }); ok( content[0] == 'blabla', 'Check first tab'); ok( content[1] == 'blublu', 'Check second tab'); start(); }); 
context: test("test global handlers - failure", function() {	expect(6);	stop();	var counter = { complete: 0, success: 0, error: 0 },		success = function() { counter.success++ },		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' );	  counter.error = counter.success = counter.complete = 0;	  $.ajaxTimeout(500);	  $.ajax({url: "data/name.php?wait=5", global: false, success: success, error: error, complete: function() {	     ok( counter.error == 1, 'Check failed request without globals' );	     ok( counter.success == 0, 'Check failed request without globals' );	     ok( counter.complete == 0, 'Check failed request without globals' );	     start();	  }});	}});});
meta: 2798	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2798/ae58d24fd55e33b9977516988e696466fdaefa18/ajaxTest.js/buggy/src/ajax/ajaxTest.js