Bug 1357590 - Add default button to pointer_up and pointer_down; r?ato draft
authorMaja Frydrychowicz <mjzffr@gmail.com>
Tue, 18 Apr 2017 18:31:48 -0400
changeset 565072 6acc59f9c74f8aa4fc781652ff9b193955727bdc
parent 565030 c0ea5ed7f91a6be996a4a3c5ab25e2cdf6b4377e
child 565073 2d29c276f578bf844c4015ed75b78134b2ac1cb5
push id54785
push userbmo:mjzffr@gmail.com
push dateWed, 19 Apr 2017 13:55:52 +0000
reviewersato
bugs1357590
milestone55.0a1
Bug 1357590 - Add default button to pointer_up and pointer_down; r?ato MozReview-Commit-ID: Ll7O3peSrme
testing/web-platform/tests/tools/webdriver/webdriver/client.py
--- 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,