Backed out changeset f257c058033a (bug 1337133)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 15 Mar 2017 19:23:21 +0100
changeset 347868 cd23eea2fb3f0af18b66f731526649fdc77faa40
parent 347867 f8327c3fc278cf37f0363dad3abae3880b6b153b
child 347869 4dc362bfa469433c44ddbca13d2e54a24670f9d0
push id38951
push userkwierso@gmail.com
push dateWed, 15 Mar 2017 21:29:40 +0000
treeherderautoland@0b51e2a9d781 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1337133
milestone55.0a1
backs outf257c058033aee6143358ea9e793ea8707379694
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
Backed out changeset f257c058033a (bug 1337133)
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
@@ -84,91 +84,45 @@ class ActionSequence(object):
 
     May be chained together as in::
 
          ActionSequence(session, "key", id) \
             .key_down("a") \
             .key_up("a") \
             .perform()
     """
-    def __init__(self, session, action_type, input_id, pointer_params=None):
+    def __init__(self, session, action_type, input_id):
         """Represents a sequence of actions of one type for one input source.
 
         :param session: WebDriver session.
         :param action_type: Action type; may be "none", "key", or "pointer".
         :param input_id: ID of input source.
-        :param pointer_params: Optional dictionary of pointer parameters.
         """
         self.session = session
+        # TODO take advantage of remote end generating uuid
         self._id = input_id
         self._type = action_type
         self._actions = []
-        self._pointer_params = pointer_params
 
     @property
     def dict(self):
-        d = {
-            "type": self._type,
-            "id": self._id,
-            "actions": self._actions,
+        return {
+          "type": self._type,
+          "id": self._id,
+          "actions": self._actions,
         }
-        if self._pointer_params is not None:
-            d["parameters"] = self._pointer_params
-        return d
 
     @command
     def perform(self):
         """Perform all queued actions."""
         self.session.actions.perform([self.dict])
 
     def _key_action(self, subtype, value):
         self._actions.append({"type": subtype, "value": value})
 
-    def _pointer_action(self, subtype, button):
-        self._actions.append({"type": subtype, "button": button})
-
-    def pointer_move(self, x, y, duration=None, origin=None):
-        """Queue a pointerMove action.
-
-        :param x: Destination x-axis coordinate of pointer in CSS pixels.
-        :param y: Destination y-axis coordinate of pointer in CSS pixels.
-        :param duration: Number of milliseconds over which to distribute the
-                         move. If None, remote end defaults to 0.
-        :param origin: Origin of coordinates, either "viewport", "pointer" or
-                       an Element. If None, remote end defaults to "viewport".
-        """
-        # TODO change to pointerMove once geckodriver > 0.14 is available on mozilla-central
-        action = {
-            "type": "move",
-            "x": x,
-            "y": y
-        }
-        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):
-        """Queue a pointerUp action for `button`.
-
-        :param button: Pointer button to perform action with.
-        """
-        self._pointer_action("pointerUp", button)
-        return self
-
-    def pointer_down(self, button):
-        """Queue a pointerDown action for `button`.
-
-        :param button: Pointer button to perform action with.
-        """
-        self._pointer_action("pointerDown", button)
-        return self
-
     def key_up(self, value):
         """Queue a keyUp action for `value`.
 
         :param value: Character to perform key action with.
         """
         self._key_action("keyUp", value)
         return self