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

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

Issue 134243004: Telemetry: allow user to specify source type for synthetic gestures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-upload Created 6 years, 11 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/tap.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bb6e746ade25a5234986d107ae5ddec51eeea61f..598acebfda6b92a6030eddd07f513e2d14bbf90a 100644
--- a/tools/telemetry/telemetry/page/actions/swipe.py
+++ b/tools/telemetry/telemetry/page/actions/swipe.py
@@ -3,10 +3,10 @@
# found in the LICENSE file.
import os
-from telemetry.page.actions import gesture_action
+from telemetry.page.actions.gesture_action import GestureAction
from telemetry.page.actions import page_action
-class SwipeAction(gesture_action.GestureAction):
+class SwipeAction(GestureAction):
def __init__(self, attributes=None):
super(SwipeAction, self).__init__(attributes)
self._SetTimelineMarkerBaseName('SwipeAction::RunAction')
@@ -22,6 +22,11 @@ class SwipeAction(gesture_action.GestureAction):
raise page_action.PageActionNotSupported(
'Synthetic swipe not supported for this browser')
+ if (GestureAction.GetGestureSourceTypeFromOptions(tab) ==
+ 'chrome.gpuBenchmarking.MOUSE_INPUT'):
+ raise page_action.PageActionNotSupported(
+ 'Swipe page action does not support mouse input')
+
# TODO(dominikg): Query synthetic gesture target to check if touch is
# supported.
« no previous file with comments | « tools/telemetry/telemetry/page/actions/scroll.py ('k') | tools/telemetry/telemetry/page/actions/tap.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698