Bug 1357590 - Add default button to pointer_up and pointer_down; r?ato
MozReview-Commit-ID: Ll7O3peSrme
--- a/testing/web-platform/tests/tools/webdriver/webdriver/client.py
+++ b/testing/web-platform/tests/tools/webdriver/webdriver/client.py
@@ -146,28 +146,30 @@ class ActionSequence(object):
}
if duration is not None:
action["duration"] = duration
if origin is not None:
action["origin"] = origin if isinstance(origin, basestring) else origin.json()
self._actions.append(action)
return self
- def pointer_up(self, button):
+ def pointer_up(self, button=0):
"""Queue a pointerUp action for `button`.
:param button: Pointer button to perform action with.
+ Default: 0, which represents main device button.
"""
self._pointer_action("pointerUp", button)
return self
- def pointer_down(self, button):
+ def pointer_down(self, button=0):
"""Queue a pointerDown action for `button`.
:param button: Pointer button to perform action with.
+ Default: 0, which represents main device button.
"""
self._pointer_action("pointerDown", button)
return self
def click(self, element=None, button=0):
"""Queue a click with the specified button.
If an element is given, move the pointer to that element first,