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

Unified Diff: tools/telemetry/telemetry/page/actions/scroll_bounce.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
« no previous file with comments | « tools/telemetry/telemetry/page/actions/scroll.py ('k') | tools/telemetry/telemetry/page/actions/swipe.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/page/actions/scroll_bounce.py
diff --git a/tools/telemetry/telemetry/page/actions/scroll_bounce.py b/tools/telemetry/telemetry/page/actions/scroll_bounce.py
index d17c0856f0ec01cb4041faf43019e9d087effee3..cadd3a4fcc79c5f2fd813f4f65534896e7aaf3aa 100644
--- a/tools/telemetry/telemetry/page/actions/scroll_bounce.py
+++ b/tools/telemetry/telemetry/page/actions/scroll_bounce.py
@@ -3,10 +3,9 @@
# found in the LICENSE file.
import os
-from telemetry.page.actions.gesture_action import GestureAction
from telemetry.page.actions import page_action
-class ScrollBounceAction(GestureAction):
+class ScrollBounceAction(page_action.PageAction):
def __init__(self, selector=None, text=None, element_function=None,
left_start_ratio=0.5, top_start_ratio=0.5,
direction='down', distance=100,
@@ -16,7 +15,6 @@ class ScrollBounceAction(GestureAction):
if direction not in ['down', 'up', 'left', 'right']:
raise page_action.PageActionNotSupported(
'Invalid scroll direction: %s' % self.direction)
- self.automatically_record_interaction = False
self._selector = selector
self._text = text
self._element_function = element_function
@@ -52,11 +50,11 @@ class ScrollBounceAction(GestureAction):
# Fail if we can't send touch events (bouncing is really only
# interesting for touch)
- if not GestureAction.IsGestureSourceTypeSupported(tab, 'touch'):
+ if not page_action.IsGestureSourceTypeSupported(tab, 'touch'):
raise page_action.PageActionNotSupported(
'Touch scroll not supported for this browser')
- if (GestureAction.GetGestureSourceTypeFromOptions(tab) ==
+ if (page_action.GetGestureSourceTypeFromOptions(tab) ==
'chrome.gpuBenchmarking.MOUSE_INPUT'):
raise page_action.PageActionNotSupported(
'ScrollBounce page action does not support mouse input')
@@ -67,7 +65,7 @@ class ScrollBounceAction(GestureAction):
window.__scrollBounceAction = new __ScrollBounceAction(%s);"""
% (done_callback))
- def RunGesture(self, tab):
+ def RunAction(self, tab):
code = '''
function(element, info) {
if (!element) {
« no previous file with comments | « tools/telemetry/telemetry/page/actions/scroll.py ('k') | tools/telemetry/telemetry/page/actions/swipe.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698