selenium-webdriver
Version:
The official WebDriver JavaScript bindings from the Selenium project
80 lines (79 loc) • 34.1 kB
HTML
<meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>goog.testing.events</title><link href="dossier.css" rel="stylesheet" type="text/css"><div id="main-wrapper"><input type="checkbox" id="sidenav-toggle" /><main><header><h1>Namespace goog.testing.events</h1><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l35">code »</a></header><section></section><section><h2>Classes</h2><div class="type-summary"><table><tbody><tr><td><dl><dt><a href="class_goog_testing_events_Event.html">goog.testing.events.Event</a><dd>goog.events.BrowserEvent expects an Event so we provide one for JSCompiler.</dl></table></div></section><div id="visibility-controls"><b>Show:</b><label for="show-public"><span><input type="checkbox" id="show-public" checked/></span>Public</label><label for="show-protected"><span><input type="checkbox" id="show-protected"/></span>Protected</label><label for="show-private"><span><input type="checkbox" id="show-private"/></span>Private</label></div><section id="static-functions"><h2>Global Functions</h2><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l121">code »</a><span class="member"><a name="goog.testing.events.assertEventTarget_">goog.testing.events.assertEventTarget_</a> <span class="args">( target )</span> ⇒ <code class="type">!EventTarget</code></span></div><p>Asserts an event target exists. This will fail if target is not defined.
TODO(nnaze): Gradually add this to the methods in this file, and eventually
update the method signatures to not take nullables. See http://b/8961907</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>target: <code class="type">EventTarget</code><dd>A target to assert.</dl><tr><th>Returns<tr><td><dl>The target, guaranteed to exist.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l555">code »</a><span class="member"><a name="goog.testing.events.fireBlurEvent">goog.testing.events.fireBlurEvent</a> <span class="args">( target )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Simulate a blur event on the given target.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>target: <code class="type">EventTarget</code><dd>The target for the event.</dl><tr><th>Returns<tr><td><dl>The value returned by firing the blur browser event,
which returns false iff 'preventDefault' was invoked.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l583">code »</a><span class="member"><a name="goog.testing.events.fireBrowserEvent">goog.testing.events.fireBrowserEvent</a> <span class="args">( event )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Simulates an event's capturing and bubbling phases.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>event: <code class="type">Event</code><dd>A simulated native event. It will be wrapped in a
normalized BrowserEvent and dispatched to Closure listeners on all
ancestors of its target (inclusive).</dl><tr><th>Returns<tr><td><dl>The returnValue of the event: false if preventDefault() was
called on it, true otherwise.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l409">code »</a><span class="member"><a name="goog.testing.events.fireClickEvent">goog.testing.events.fireClickEvent</a> <span class="args">( target, opt_button, opt_coords, opt_eventProperties )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Simulates a click event on the given target. IE only supports click with
the left mouse button.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>target: <code class="type">EventTarget</code><dd>The target for the event.<dt>opt_button: <code class="type"><a href="enum_goog_events_BrowserEvent_MouseButton.html">goog.events.BrowserEvent.MouseButton</a>=</code><dd>Mouse button;
defaults to <code >goog.events.BrowserEvent.MouseButton.LEFT</code>.<dt>opt_coords: <code class="type"><a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a>=</code><dd>Mouse position. Defaults to event's
target's position (if available), otherwise (0, 0).<dt>opt_eventProperties: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>Event properties to be mixed into the
BrowserEvent.</dl><tr><th>Returns<tr><td><dl>The returnValue of the event: false if preventDefault() was
called on it, true otherwise.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l165">code »</a><span class="member"><a name="goog.testing.events.fireClickSequence">goog.testing.events.fireClickSequence</a> <span class="args">( target, opt_button, opt_coords, opt_eventProperties )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Simulates a mousedown, mouseup, and then click on the given event target,
with the left mouse button.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>target: <code class="type">EventTarget</code><dd>The target for the event.<dt>opt_button: <code class="type"><a href="enum_goog_events_BrowserEvent_MouseButton.html">goog.events.BrowserEvent.MouseButton</a>=</code><dd>Mouse button;
defaults to <code >goog.events.BrowserEvent.MouseButton.LEFT</code>.<dt>opt_coords: <code class="type"><a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a>=</code><dd>Mouse position. Defaults to event's
target's position (if available), otherwise (0, 0).<dt>opt_eventProperties: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>Event properties to be mixed into the
BrowserEvent.</dl><tr><th>Returns<tr><td><dl>The returnValue of the sequence: false if preventDefault()
was called on any of the events, true otherwise.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l474">code »</a><span class="member"><a name="goog.testing.events.fireContextMenuEvent">goog.testing.events.fireContextMenuEvent</a> <span class="args">( target, opt_coords )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Simulates a contextmenu event on the given target.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>target: <code class="type">EventTarget</code><dd>The target for the event.<dt>opt_coords: <code class="type"><a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a>=</code><dd>Mouse position. Defaults to event's
target's position (if available), otherwise (0, 0).</dl><tr><th>Returns<tr><td><dl>The returnValue of the event: false if preventDefault() was
called on it, true otherwise.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l497">code »</a><span class="member"><a name="goog.testing.events.fireContextMenuSequence">goog.testing.events.fireContextMenuSequence</a> <span class="args">( target, opt_coords )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Simulates a mousedown, contextmenu, and the mouseup on the given event
target, with the right mouse button.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>target: <code class="type">EventTarget</code><dd>The target for the event.<dt>opt_coords: <code class="type"><a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a>=</code><dd>Mouse position. Defaults to event's
target's position (if available), otherwise (0, 0).</dl><tr><th>Returns<tr><td><dl>The returnValue of the sequence: false if preventDefault()
was called on any of the events, true otherwise.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l428">code »</a><span class="member"><a name="goog.testing.events.fireDoubleClickEvent">goog.testing.events.fireDoubleClickEvent</a> <span class="args">( target, opt_coords, opt_eventProperties )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>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.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>target: <code class="type">EventTarget</code><dd>The target for the event.<dt>opt_coords: <code class="type"><a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a>=</code><dd>Mouse position. Defaults to event's
target's position (if available), otherwise (0, 0).<dt>opt_eventProperties: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>Event properties to be mixed into the
BrowserEvent.</dl><tr><th>Returns<tr><td><dl>The returnValue of the event: false if preventDefault() was
called on it, true otherwise.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l188">code »</a><span class="member"><a name="goog.testing.events.fireDoubleClickSequence">goog.testing.events.fireDoubleClickSequence</a> <span class="args">( target, opt_coords, opt_eventProperties )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Simulates the sequence of events fired by the browser when the user double-
clicks the given target.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>target: <code class="type">EventTarget</code><dd>The target for the event.<dt>opt_coords: <code class="type"><a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a>=</code><dd>Mouse position. Defaults to event's
target's position (if available), otherwise (0, 0).<dt>opt_eventProperties: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>Event properties to be mixed into the
BrowserEvent.</dl><tr><th>Returns<tr><td><dl>The returnValue of the sequence: false if preventDefault()
was called on any of the events, true otherwise.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l568">code »</a><span class="member"><a name="goog.testing.events.fireFocusEvent">goog.testing.events.fireFocusEvent</a> <span class="args">( target )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Simulate a focus event on the given target.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>target: <code class="type">EventTarget</code><dd>The target for the event.</dl><tr><th>Returns<tr><td><dl>The value returned by firing the focus browser event,
which returns false iff 'preventDefault' was invoked.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l226">code »</a><span class="member"><a name="goog.testing.events.fireKeySequence">goog.testing.events.fireKeySequence</a> <span class="args">( target, keyCode, opt_eventProperties )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Simulates a complete keystroke (keydown, keypress, and keyup). Note that
if preventDefault is called on the keydown, the keypress will not fire.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>target: <code class="type">EventTarget</code><dd>The target for the event.<dt>keyCode: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd>The keycode of the key pressed.<dt>opt_eventProperties: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>Event properties to be mixed into the
BrowserEvent.</dl><tr><th>Returns<tr><td><dl>The returnValue of the sequence: false if preventDefault()
was called on any of the events, true otherwise.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l453">code »</a><span class="member"><a name="goog.testing.events.fireMouseButtonEvent_">goog.testing.events.fireMouseButtonEvent_</a> <span class="args">( type, target, opt_button, opt_coords, opt_eventProperties )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Helper function to fire a mouse event.
with the left mouse button since no browser supports double-clicking with
any other buttons.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>type: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The event type.<dt>target: <code class="type">EventTarget</code><dd>The target for the event.<dt>opt_button: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>=</code><dd>Mouse button; defaults to
<code >goog.events.BrowserEvent.MouseButton.LEFT</code>.<dt>opt_coords: <code class="type"><a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a>=</code><dd>Mouse position. Defaults to event's
target's position (if available), otherwise (0, 0).<dt>opt_eventProperties: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>Event properties to be mixed into the
BrowserEvent.</dl><tr><th>Returns<tr><td><dl>The returnValue of the event: false if preventDefault() was
called on it, true otherwise.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l361">code »</a><span class="member"><a name="goog.testing.events.fireMouseDownEvent">goog.testing.events.fireMouseDownEvent</a> <span class="args">( target, opt_button, opt_coords, opt_eventProperties )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Simulates a mousedown event on the given target.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>target: <code class="type">EventTarget</code><dd>The target for the event.<dt>opt_button: <code class="type"><a href="enum_goog_events_BrowserEvent_MouseButton.html">goog.events.BrowserEvent.MouseButton</a>=</code><dd>Mouse button;
defaults to <code >goog.events.BrowserEvent.MouseButton.LEFT</code>.<dt>opt_coords: <code class="type"><a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a>=</code><dd>Mouse position. Defaults to event's
target's position (if available), otherwise (0, 0).<dt>opt_eventProperties: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>Event properties to be mixed into the
BrowserEvent.</dl><tr><th>Returns<tr><td><dl>The returnValue of the event: false if preventDefault() was
called on it, true otherwise.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l320">code »</a><span class="member"><a name="goog.testing.events.fireMouseMoveEvent">goog.testing.events.fireMouseMoveEvent</a> <span class="args">( target, opt_coords )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Simulates a mousemove event on the given target.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>target: <code class="type">EventTarget</code><dd>The target for the event.<dt>opt_coords: <code class="type"><a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a>=</code><dd>Mouse position. Defaults to event's
target's position (if available), otherwise (0, 0).</dl><tr><th>Returns<tr><td><dl>The returnValue of the event: false if preventDefault() was
called on it, true otherwise.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l339">code »</a><span class="member"><a name="goog.testing.events.fireMouseOutEvent">goog.testing.events.fireMouseOutEvent</a> <span class="args">( target, relatedTarget, opt_coords )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Simulates a mouseout event on the given target.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>target: <code class="type">EventTarget</code><dd>The target for the event.<dt>relatedTarget: <code class="type">EventTarget</code><dd>The related target for the event (e.g.,
the node that the mouse is being moved into).<dt>opt_coords: <code class="type"><a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a>=</code><dd>Mouse position. Defaults to event's
target's position (if available), otherwise (0, 0).</dl><tr><th>Returns<tr><td><dl>The returnValue of the event: false if preventDefault() was
called on it, true otherwise.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l302">code »</a><span class="member"><a name="goog.testing.events.fireMouseOverEvent">goog.testing.events.fireMouseOverEvent</a> <span class="args">( target, relatedTarget, opt_coords )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Simulates a mouseover event on the given target.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>target: <code class="type">EventTarget</code><dd>The target for the event.<dt>relatedTarget: <code class="type">EventTarget</code><dd>The related target for the event (e.g.,
the node that the mouse is being moved out of).<dt>opt_coords: <code class="type"><a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a>=</code><dd>Mouse position. Defaults to event's
target's position (if available), otherwise (0, 0).</dl><tr><th>Returns<tr><td><dl>The returnValue of the event: false if preventDefault() was
called on it, true otherwise.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l385">code »</a><span class="member"><a name="goog.testing.events.fireMouseUpEvent">goog.testing.events.fireMouseUpEvent</a> <span class="args">( target, opt_button, opt_coords, opt_eventProperties )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Simulates a mouseup event on the given target.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>target: <code class="type">EventTarget</code><dd>The target for the event.<dt>opt_button: <code class="type"><a href="enum_goog_events_BrowserEvent_MouseButton.html">goog.events.BrowserEvent.MouseButton</a>=</code><dd>Mouse button;
defaults to <code >goog.events.BrowserEvent.MouseButton.LEFT</code>.<dt>opt_coords: <code class="type"><a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a>=</code><dd>Mouse position. Defaults to event's
target's position (if available), otherwise (0, 0).<dt>opt_eventProperties: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>Event properties to be mixed into the
BrowserEvent.</dl><tr><th>Returns<tr><td><dl>The returnValue of the event: false if preventDefault() was
called on it, true otherwise.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l246">code »</a><span class="member"><a name="goog.testing.events.fireNonAsciiKeySequence">goog.testing.events.fireNonAsciiKeySequence</a> <span class="args">( target, keyCode, keyPressKeyCode, opt_eventProperties )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>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.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>target: <code class="type">EventTarget</code><dd>The target for the event.<dt>keyCode: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd>The keycode of the keydown and keyup events.<dt>keyPressKeyCode: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd>The keycode of the keypress event.<dt>opt_eventProperties: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>Event properties to be mixed into the
BrowserEvent.</dl><tr><th>Returns<tr><td><dl>The returnValue of the sequence: false if preventDefault()
was called on any of the events, true otherwise.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l542">code »</a><span class="member"><a name="goog.testing.events.firePopStateEvent">goog.testing.events.firePopStateEvent</a> <span class="args">( target, state )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Simulates a popstate event on the given target.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>target: <code class="type">EventTarget</code><dd>The target for the event.<dt>state: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code><dd>History state object.</dl><tr><th>Returns<tr><td><dl>The returnValue of the event: false if preventDefault() was
called on it, true otherwise.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l668">code »</a><span class="member"><a name="goog.testing.events.fireTouchEndEvent">goog.testing.events.fireTouchEndEvent</a> <span class="args">( target, opt_coords, opt_eventProperties )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Simulates a touchend event on the given target.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>target: <code class="type">EventTarget</code><dd>The target for the event.<dt>opt_coords: <code class="type"><a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a>=</code><dd>Touch position. Defaults to event's
target's position (if available), otherwise (0, 0).<dt>opt_eventProperties: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>Event properties to be mixed into the
BrowserEvent.</dl><tr><th>Returns<tr><td><dl>The returnValue of the event: false if preventDefault() was
called on it, true otherwise.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l645">code »</a><span class="member"><a name="goog.testing.events.fireTouchMoveEvent">goog.testing.events.fireTouchMoveEvent</a> <span class="args">( target, opt_coords, opt_eventProperties )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Simulates a touchmove event on the given target.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>target: <code class="type">EventTarget</code><dd>The target for the event.<dt>opt_coords: <code class="type"><a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a>=</code><dd>Touch position. Defaults to event's
target's position (if available), otherwise (0, 0).<dt>opt_eventProperties: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>Event properties to be mixed into the
BrowserEvent.</dl><tr><th>Returns<tr><td><dl>The returnValue of the event: false if preventDefault() was
called on it, true otherwise.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l691">code »</a><span class="member"><a name="goog.testing.events.fireTouchSequence">goog.testing.events.fireTouchSequence</a> <span class="args">( target, opt_coords, opt_eventProperties )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Simulates a simple touch sequence on the given target.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>target: <code class="type">EventTarget</code><dd>The target for the event.<dt>opt_coords: <code class="type"><a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a>=</code><dd>Touch position. Defaults to event
target's position (if available), otherwise (0, 0).<dt>opt_eventProperties: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>Event properties to be mixed into the
BrowserEvent.</dl><tr><th>Returns<tr><td><dl>The returnValue of the sequence: false if preventDefault()
was called on any of the events, true otherwise.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l622">code »</a><span class="member"><a name="goog.testing.events.fireTouchStartEvent">goog.testing.events.fireTouchStartEvent</a> <span class="args">( target, opt_coords, opt_eventProperties )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Simulates a touchstart event on the given target.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>target: <code class="type">EventTarget</code><dd>The target for the event.<dt>opt_coords: <code class="type"><a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a>=</code><dd>Touch position. Defaults to event's
target's position (if available), otherwise (0, 0).<dt>opt_eventProperties: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>=</code><dd>Event properties to be mixed into the
BrowserEvent.</dl><tr><th>Returns<tr><td><dl>The returnValue of the event: false if preventDefault() was
called on it, true otherwise.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l284">code »</a><span class="member"><a name="goog.testing.events.isBrokenGeckoMacActionKey_">goog.testing.events.isBrokenGeckoMacActionKey_</a> <span class="args">( e )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div></summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>e: <code class="type"><a href="class_goog_testing_events_Event.html">goog.testing.events.Event</a></code><dd>The event.</dl><tr><th>Returns<tr><td><dl>Whether this is the Gecko/Mac's Meta-C/V/X, which
is broken and requires special handling.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l709">code »</a><span class="member"><a name="goog.testing.events.mixinListenable">goog.testing.events.mixinListenable</a> <span class="args">( obj )</span></span></div><p>Mixins a listenable into the given object. This turns the object
into a goog.events.Listenable. This is useful, for example, when
you need to mock a implementation of listenable and still want it
to work with goog.events.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>obj: <code class="type">!<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></code><dd>The object to mixin into.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/testing/events/events.js.src.html#l133">code »</a><span class="member"><a name="goog.testing.events.setEventClientXY_">goog.testing.events.setEventClientXY_</a> <span class="args">( event, opt_coords )</span></span></div><p>A static helper function that sets the mouse position to the event.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>event: <code class="type">Event</code><dd>A simulated native event.<dt>opt_coords: <code class="type"><a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a>=</code><dd>Mouse position. Defaults to event's
target's position (if available), otherwise (0, 0).</dl></table></div></details></div></div></section></main><nav id="topnav"><div><div id="menubutton"><label for="sidenav-toggle">Menu</label></div><form id="searchbox"><div><input type="search" placeholder="Search" tabindex="1"></div></form></div></nav><nav id="sidenav"><input type="checkbox" id="sidenav-types-ctrl" /><input type="checkbox" id="sidenav-files-ctrl" /><input type="checkbox" id="sidenav-modules-ctrl" /><a id="sidenav-overview"><div><h4>Overview</h4></div></a><div id="sidenav-types"><label for="sidenav-types-ctrl"><h4>Types</h4></label><i>Loading</i></div><div id="sidenav-modules"><label for="sidenav-modules-ctrl"><h4>Modules</h4></label><i>Loading</i></div><div id="sidenav-files"><label for="sidenav-files-ctrl"><h4>Files</h4></label><i>Loading</i></div><a href="license.html"><div><h4>License</h4></div></a></nav><div id="push-footer"></div></div><footer><a href="https://github.com/jleyba/js-dossier">Generated by dossier</a></footer><script src="types.js"></script><script src="dossier.js"></script>