+ // test with an event object
+ event = new jQuery.Event("foo");
+ event.secret = 'boo!';
+ $child.trigger(event);
+
+ // test with a literal object
+ $child.trigger({type:'foo', secret:'boo!'});
+
+ $parent.unbind();
+
+ function error(){
+ ok( false, "This assertion shouldn't be reached");
+ }
+
+ $parent.bind('foo', error );
+
+ $child.bind('foo',function(e, a, b, c ){
+ equals( arguments.length, 4, "Check arguments length");
+ equals( a, 1, "Check first custom argument");
+ equals( b, 2, "Check second custom argument");
+ equals( c, 3, "Check third custom argument");
+
+ equals( e.isDefaultPrevented(), false, "Verify isDefaultPrevented" );
+ equals( e.isPropagationStopped(), false, "Verify isPropagationStopped" );
+ equals( e.isImmediatePropagationStopped(), false, "Verify isImmediatePropagationStopped" );
+
+ // Skips both errors
+ e.stopImmediatePropagation();
+
+ return "result";
+ });
+
+ $child.bind('foo', error );