Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Unified Diff: tools/telemetry/telemetry/page/actions/swipe.py

Issue 356243002: Delete gesture_action.py and remove support for JSON attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and address review comments. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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'
« no previous file with comments | « tools/telemetry/telemetry/page/actions/scroll_bounce.py ('k') | tools/telemetry/telemetry/page/actions/tap.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698