test("trigger(event, [data], [fn])", function() { expect(67);  var handler = function(event, a, b, c) { equals( event.type, "click", "check passed data" ); equals( a, 1, "check passed data" ); equals( b, "2", "check passed data" ); equals( c, "abc", "check passed data" ); return "test"; };  var handler2 = function(a, b, c) { equals( a, 1, "check passed data" ); equals( b, "2", "check passed data" ); equals( c, "abc", "check passed data" ); return false; };  var handler3 = function(a, b, c, v) { equals( a, 1, "check passed data" ); equals( b, "2", "check passed data" ); equals( c, "abc", "check passed data" ); equals( v, "test", "check current value" ); return "newVal"; };  var handler4 = function(a, b, c, v) { equals( a, 1, "check passed data" ); equals( b, "2", "check passed data" ); equals( c, "abc", "check passed data" ); equals( v, "test", "check current value" ); };   $("#firstp")[0].click = function(){ ok( true, "Native call was triggered" ); };    $("#firstp").bind("click", handler).trigger("click", [1, "2", "abc"]);    $("#firstp").trigger("click", [1, "2", "abc"], handler4);   $("#firstp")[0].click = function(){ ok( false, "Native call was triggered" ); };    $("#firstp").trigger("click", [1, "2", "abc"], handler2);    equals( $("#firstp").triggerHandler("click", [1, "2", "abc"]), "test", "Verify handler response" );    equals( $("#firstp").triggerHandler("click", [1, "2", "abc"], handler2), false, "Verify handler response" );   var eventObj = jQuery.event.fix({ type: "foo", target: document.body });    equals( $("#firstp").triggerHandler("click", [eventObj, 1, "2", "abc"]), "test", "Verify handler response" );    eventObj = jQuery.event.fix({ type: "foo", target: document.body }); equals( $("#firstp").triggerHandler("click", [eventObj, 1, "2", "abc"], handler), "test", "Verify handler response" );  var pass = true; try { $('input:first') .hide() .trigger('focus'); } catch(e) { pass = false; } ok( pass, "Trigger focus on hidden element" );    equals( $("#firstp").triggerHandler("click", [1, "2", "abc"], handler3), "newVal", "Verify triggerHandler return is overwritten by extra function" );    equals( $("#firstp").triggerHandler("click", [1, "2", "abc"], handler4), "test", "Verify triggerHandler return is not overwritten by extra function" ); }); 
el.unbind('change',function(){ return; }); 
test("trigger(event, [data], [fn])", function() {	expect(67);	var handler = function(event, a, b, c) {		equals( event.type, "click", "check passed data" );		equals( a, 1, "check passed data" );		equals( b, "2", "check passed data" );		equals( c, "abc", "check passed data" );		return "test";	};	var handler2 = function(a, b, c) {		equals( a, 1, "check passed data" );		equals( b, "2", "check passed data" );		equals( c, "abc", "check passed data" );		return false;	};	var handler3 = function(a, b, c, v) {		equals( a, 1, "check passed data" );		equals( b, "2", "check passed data" );		equals( c, "abc", "check passed data" );		equals( v, "test", "check current value" );		return "newVal";	};	var handler4 = function(a, b, c, v) {		equals( a, 1, "check passed data" );		equals( b, "2", "check passed data" );		equals( c, "abc", "check passed data" );		equals( v, "test", "check current value" );	};	// Simulate a "native" click	$("#firstp")[0].click = function(){		ok( true, "Native call was triggered" );	};	// Triggers handlrs and native	// Trigger 5	$("#firstp").bind("click", handler).trigger("click", [1, "2", "abc"]);	// Triggers handlers, native, and extra fn	// Triggers 9	$("#firstp").trigger("click", [1, "2", "abc"], handler4);	// Simulate a "native" click	$("#firstp")[0].click = function(){		ok( false, "Native call was triggered" );	};	// Triggers handlers, native, and extra fn	// Triggers 7	$("#firstp").trigger("click", [1, "2", "abc"], handler2);	// Trigger only the handlers (no native)	// Triggers 5	equals( $("#firstp").triggerHandler("click", [1, "2", "abc"]), "test", "Verify handler response" );	// Trigger only the handlers (no native) and extra fn	// Triggers 8	equals( $("#firstp").triggerHandler("click", [1, "2", "abc"], handler2), false, "Verify handler response" );	// Build fake click event to pass in	var eventObj = jQuery.event.fix({ type: "foo", target: document.body });	// Trigger only the handlers (no native), with external event obj	// Triggers 5	equals( $("#firstp").triggerHandler("click", [eventObj, 1, "2", "abc"]), "test", "Verify handler response" );	// Trigger only the handlers (no native) and extra fn, with external event obj	// Triggers 9	eventObj = jQuery.event.fix({ type: "foo", target: document.body });	equals( $("#firstp").triggerHandler("click", [eventObj, 1, "2", "abc"], handler), "test", "Verify handler response" );		var pass = true;	try {		$('input:first')			.hide()			.trigger('focus');	} catch(e) {		pass = false;	}	ok( pass, "Trigger focus on hidden element" );	// have the extra handler override the return	// Triggers 9	equals( $("#firstp").triggerHandler("click", [1, "2", "abc"], handler3), "newVal", "Verify triggerHandler return is overwritten by extra function" );	// have the extra handler leave the return value alone	// Triggers 9	equals( $("#firstp").triggerHandler("click", [1, "2", "abc"], handler4), "test", "Verify triggerHandler return is not overwritten by extra function" );});
6056	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6056/3261544c38ca70cc02c5eed7d0ab2c40c521a588/event.js/clean/test/unit/event.js