Bug 1357590 - Add default button to pointer_up and pointer_down; r=ato
authorMaja Frydrychowicz <mjzffr@gmail.com>
Tue, 18 Apr 2017 18:31:48 -0400
changeset 357853 2e1cde1c33e52d67d4c931824f84edda0942b6cd
parent 357852 cf9c01ad600dbe9ed794548c5c46353fdf8b3537
child 357854 612b93488bf5e52e3698fe027411884343bf8dd7
push id31804
push userkwierso@gmail.com
push dateFri, 12 May 2017 00:33:03 +0000
treeherdermozilla-central@2a8e0c4be57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato
bugs1357590
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
@@ -142,28 +142,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,