rem: test("test global handlers - failure", function() { expect(8); stop(); var counter = { complete: 0, success: 0, error: 0, send: 0 }, success = function() { counter.success++ }, error = function() { counter.error++ }, complete = function() { counter.complete++ }, send = function() { counter.send++ }; $.ajaxTimeout(0); $('#foo').ajaxStart(complete).ajaxStop(complete).ajaxSend(send).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success); $.ajax({url: "data/name.php", global: false, beforeSend: send, 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' ); ok( counter.send == 1, 'Check sucesful request without globals' ); counter.error = counter.success = counter.complete = counter.send = 0; $.ajaxTimeout(500); $.ajax({url: "data/name.php?wait=5", global: false, beforeSend: send, 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' ); ok( counter.send == 1, 'Check failed request without globals' ); start(); }}); }}); }); 
add: $('#first').load('data/test.html', function() { ok( $('#first').html().match(/^html text/), 'Check content after loading html' ); ok( testFoo == "foo", 'Check if script was evaluated after load' ); setTimeout(verifyEvaluation, 600); }); 
context: test("test global handlers - failure", function() {	expect(8);	stop();	var counter = { complete: 0, success: 0, error: 0, send: 0 },		success = function() { counter.success++ },		error = function() { counter.error++ },		complete = function() { counter.complete++ },		send = function() { counter.send++ };	$.ajaxTimeout(0);	$('#foo').ajaxStart(complete).ajaxStop(complete).ajaxSend(send).ajaxComplete(complete).ajaxError(error).ajaxSuccess(success);	$.ajax({url: "data/name.php", global: false, beforeSend: send, 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' );	  ok( counter.send == 1, 'Check sucesful request without globals' );	  counter.error = counter.success = counter.complete = counter.send = 0;	  $.ajaxTimeout(500);	  $.ajax({url: "data/name.php?wait=5", global: false, beforeSend: send, 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' );	     ok( counter.send == 1, 'Check failed request without globals' );	     start();	  }});	}});});
meta: 3217	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3217/898ca3198b3297f68eb77ad128450ad8f952e15e/ajaxTest.js/buggy/src/ajax/ajaxTest.js