Home

# Library goog.testing.events

Function Summary
| `fireBrowserEvent(?Event event) ⇒ boolean` Simulates an event's capturing and bubbling phases.
| `fireClickEvent(?EventTarget target, ?goog.events.BrowserEvent.MouseButton= opt_button, ?goog.math.Coordinate= opt_coords, ?Object= opt_eventProperties) ⇒ boolean` Simulates a click event on the given target. IE only supports click with the left mouse button.
| `fireClickSequence(?EventTarget target, ?goog.events.BrowserEvent.MouseButton= opt_button, ?goog.math.Coordinate= opt_coords, ?Object= opt_eventProperties) ⇒ boolean` Simulates a mousedown, mouseup, and then click on the given event target, with the left mouse button.
| `fireContextMenuEvent(?EventTarget target, ?goog.math.Coordinate= opt_coords) ⇒ boolean` Simulates a contextmenu event on the given target.
| `fireContextMenuSequence(?EventTarget target, ?goog.math.Coordinate= opt_coords) ⇒ boolean` Simulates a mousedown, contextmenu, and the mouseup on the given event target, with the right mouse button.
| `fireDoubleClickEvent(?EventTarget target, ?goog.math.Coordinate= opt_coords, ?Object= opt_eventProperties) ⇒ boolean` Simulates a double-click event on the given target. Always double-clicks with the left mouse button since no browser supports double-clicking with any other buttons.
| `fireDoubleClickSequence(?EventTarget target, ?goog.math.Coordinate= opt_coords, ?Object= opt_eventProperties) ⇒ boolean` Simulates the sequence of events fired by the browser when the user double- clicks the given target.
| `fireFocusEvent(?EventTarget target) ⇒ boolean` Simulate a focus event on the given target.
| `fireKeySequence(?EventTarget target, number keyCode, ?Object= opt_eventProperties) ⇒ boolean` Simulates a complete keystroke (keydown, keypress, and keyup). Note that if preventDefault is called on the keydown, the keypress will not fire.
| `fireMouseButtonEvent_(string type, ?EventTarget target, number= opt_button, ?goog.math.Coordinate= opt_coords, ?Object= opt_eventProperties) ⇒ boolean` Helper function to fire a mouse event. with the left mouse button since no browser supports double-clicking with any other buttons.
| `fireMouseDownEvent(?EventTarget target, ?goog.events.BrowserEvent.MouseButton= opt_button, ?goog.math.Coordinate= opt_coords, ?Object= opt_eventProperties) ⇒ boolean` Simulates a mousedown event on the given target.
| `fireMouseMoveEvent(?EventTarget target, ?goog.math.Coordinate= opt_coords) ⇒ boolean` Simulates a mousemove event on the given target.
| `fireMouseOutEvent(?EventTarget target, ?EventTarget relatedTarget, ?goog.math.Coordinate= opt_coords) ⇒ boolean` Simulates a mouseout event on the given target.
| `fireMouseOverEvent(?EventTarget target, ?EventTarget relatedTarget, ?goog.math.Coordinate= opt_coords) ⇒ boolean` Simulates a mouseover event on the given target.
| `fireMouseUpEvent(?EventTarget target, ?goog.events.BrowserEvent.MouseButton= opt_button, ?goog.math.Coordinate= opt_coords, ?Object= opt_eventProperties) ⇒ boolean` Simulates a mouseup event on the given target.
| `fireNonAsciiKeySequence(?EventTarget target, number keyCode, number keyPressKeyCode, ?Object= opt_eventProperties) ⇒ boolean` Simulates a complete keystroke (keydown, keypress, and keyup) when typing a non-ASCII character. Same as fireKeySequence, the keypress will not fire if preventDefault is called on the keydown.
| `firePopStateEvent(?EventTarget target, ?Object state) ⇒ boolean` Simulates a popstate event on the given target.
| `isBrokenGeckoMacActionKey_(?goog.testing.events.Event e) ⇒ boolean`
| `setEventClientXY_(?Event event, ?goog.math.Coordinate= opt_coords)` A static helper function that sets the mouse position to the event.