| Index: tools/telemetry/telemetry/page/actions/swipe.py
|
| diff --git a/tools/telemetry/telemetry/page/actions/swipe.py b/tools/telemetry/telemetry/page/actions/swipe.py
|
| index 8d35dd0bf5f44a39a83fe78a4c068e6974b82a4e..13842f4c0314c3b9915693db3790b0da5997f03b 100644
|
| --- a/tools/telemetry/telemetry/page/actions/swipe.py
|
| +++ b/tools/telemetry/telemetry/page/actions/swipe.py
|
| @@ -4,10 +4,9 @@
|
|
|
| import os
|
|
|
| -from telemetry.page.actions.gesture_action import GestureAction
|
| from telemetry.page.actions import page_action
|
|
|
| -class SwipeAction(GestureAction):
|
| +class SwipeAction(page_action.PageAction):
|
| def __init__(self, selector=None, text=None, element_function=None,
|
| left_start_ratio=0.5, top_start_ratio=0.5,
|
| direction='left', distance=100, speed_in_pixels_per_second=800):
|
| @@ -15,7 +14,6 @@ class SwipeAction(GestureAction):
|
| if direction not in ['down', 'up', 'left', 'right']:
|
| raise page_action.PageActionNotSupported(
|
| 'Invalid swipe direction: %s' % self.direction)
|
| - self.automatically_record_interaction = False
|
| self._selector = selector
|
| self._text = text
|
| self._element_function = element_function
|
| @@ -36,12 +34,12 @@ class SwipeAction(GestureAction):
|
| raise page_action.PageActionNotSupported(
|
| 'Synthetic swipe not supported for this browser')
|
|
|
| - if (GestureAction.GetGestureSourceTypeFromOptions(tab) ==
|
| + if (page_action.GetGestureSourceTypeFromOptions(tab) ==
|
| 'chrome.gpuBenchmarking.MOUSE_INPUT'):
|
| raise page_action.PageActionNotSupported(
|
| 'Swipe page action does not support mouse input')
|
|
|
| - if not GestureAction.IsGestureSourceTypeSupported(tab, 'touch'):
|
| + if not page_action.IsGestureSourceTypeSupported(tab, 'touch'):
|
| raise page_action.PageActionNotSupported(
|
| 'Touch input not supported for this browser')
|
|
|
| @@ -51,7 +49,7 @@ class SwipeAction(GestureAction):
|
| window.__swipeAction = new __SwipeAction(%s);"""
|
| % (done_callback))
|
|
|
| - def RunGesture(self, tab):
|
| + def RunAction(self, tab):
|
| if (self._selector is None and self._text is None and
|
| self._element_function is None):
|
| self._element_function = 'document.body'
|
|
|