rem: test("toggle(Function, Function)", function() { expect(5); var count = 0, fn1 = function(e) { count++; }, fn2 = function(e) { count--; }, preventDefault = function(e) { e.preventDefault() }, link = $('#mark'); link.click(preventDefault).click().toggle(fn1, fn2).click().click().click().click().click(); ok( count == 1, "Check for toggle(fn, fn)" );  $("#firstp").toggle(function () { equals(arguments.length, 4, "toggle correctly passes through additional triggered arguments, see #1701" ) }, function() {}).trigger("click", [ 1, 2, 3 ]);  var first = 0; $("#simon1").one("click", function() { ok( true, "Execute event only once" ); $(this).toggle(function() { ok( first++ == 0, "toggle(Function,Function) assigned from within one('xxx'), see #1054" ); }, function() { ok( first == 1, "toggle(Function,Function) assigned from within one('xxx'), see #1054" ); }); return false; }).click().click().click(); }); 
add: $("#firstp")[0].click = function(){ ok( false, "Native call was triggered" ); }; 
context: test("toggle(Function, Function)", function() {	expect(5);	var count = 0,		fn1 = function(e) { count++; },		fn2 = function(e) { count--; },		preventDefault = function(e) { e.preventDefault() },		link = $('#mark');	link.click(preventDefault).click().toggle(fn1, fn2).click().click().click().click().click();	ok( count == 1, "Check for toggle(fn, fn)" );	$("#firstp").toggle(function () {		equals(arguments.length, 4, "toggle correctly passes through additional triggered arguments, see #1701" )	}, function() {}).trigger("click", [ 1, 2, 3 ]);	var first = 0;	$("#simon1").one("click", function() {		ok( true, "Execute event only once" );		$(this).toggle(function() {			ok( first++ == 0, "toggle(Function,Function) assigned from within one('xxx'), see #1054" );		}, function() {			ok( first == 1, "toggle(Function,Function) assigned from within one('xxx'), see #1054" );		});		return false;	}).click().click().click();});
meta: 1375	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/1375/3261544c38ca70cc02c5eed7d0ab2c40c521a588/event.js/clean/test/unit/event.js