test("unbind(event)", function() { expect(8); var el = $("#firstp"); el.click(function() { ok( true, "Fake normal bind" ); }); el.click(function(event) { el.unbind(event); ok( true, "Fake onebind" ); }); el.click().click();  el.click(function() { return; }); el.unbind('click'); ok( !el[0].onclick, "Handler is removed" );  el.click(function() { return; }); el.unbind('change',function(){ return; }); for (var ret in jQuery.data(el[0], "events")['click']) break; ok( ret, "Extra handlers weren't accidentally removed." );  el.unbind('click'); ok( !jQuery.data(el[0], "events"), "Removed the events expando after all handlers are unbound." );  reset(); var clickCounter = mouseoverCounter = 0; var handler = function(event) { if (event.type == "click") clickCounter += 1; else if (event.type == "mouseover") mouseoverCounter += 1; 
$('#firstp')[0].onclick = function(event) { counter++; 
test("unbind(event)", function() {	expect(8);	var el = $("#firstp");	el.click(function() {		ok( true, "Fake normal bind" );	});	el.click(function(event) {		el.unbind(event);		ok( true, "Fake onebind" );	});	el.click().click();		el.click(function() { return; });	el.unbind('click');	ok( !el[0].onclick, "Handler is removed" ); // Bug #964	el.click(function() { return; });	el.unbind('change',function(){ return; });	for (var ret in jQuery.data(el[0], "events")['click']) break;	ok( ret, "Extra handlers weren't accidentally removed." );	el.unbind('click');	ok( !jQuery.data(el[0], "events"), "Removed the events expando after all handlers are unbound." );		reset();	var clickCounter = mouseoverCounter = 0;	var handler = function(event) {		if (event.type == "click")			clickCounter += 1;		else if (event.type == "mouseover")			mouseoverCounter += 1;	};	$("#firstp").bind("click mouseover", handler).unbind("click mouseover", handler).trigger("click").trigger("mouseover");	ok( clickCounter == 0, "unbind() with multiple events at once" );	ok( mouseoverCounter == 0, "unbind() with multiple events at once" );});
6056	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6056/3261544c38ca70cc02c5eed7d0ab2c40c521a588/event.js/clean/test/unit/event.js