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

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

Issue 323833003: Create ActionRunner wrapper API over TapAction and ClickElementAction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing to head. Created 6 years, 6 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/gesture_action.py
diff --git a/tools/telemetry/telemetry/page/actions/gesture_action.py b/tools/telemetry/telemetry/page/actions/gesture_action.py
index 04503e5a53f1f55ef0b2658f4f4cdb76dd21e490..d05f6bab4633da7c3300deb68ae4ea7a429c0d22 100644
--- a/tools/telemetry/telemetry/page/actions/gesture_action.py
+++ b/tools/telemetry/telemetry/page/actions/gesture_action.py
@@ -5,7 +5,7 @@
from telemetry.page.actions import page_action
from telemetry.page.actions import wait
from telemetry import decorators
-from telemetry.page.actions import action_runner
+from telemetry.web_perf import timeline_interaction_record as tir_module
class GestureAction(page_action.PageAction):
def __init__(self, attributes=None):
@@ -22,22 +22,24 @@ class GestureAction(page_action.PageAction):
'gesture cannot have wait_after and wait_until at the same time.')
def RunAction(self, tab):
- runner = action_runner.ActionRunner(tab)
if self.wait_action:
interaction_name = 'Action_%s' % self.__class__.__name__
else:
interaction_name = 'Gesture_%s' % self.__class__.__name__
- interaction = None
if self.automatically_record_interaction:
- interaction = runner.BeginInteraction(interaction_name, is_smooth=True)
+ tab.ExecuteJavaScript('console.time("%s");' %
+ tir_module.TimelineInteractionRecord.GetJavaScriptMarker(
+ interaction_name, [tir_module.IS_SMOOTH]))
self.RunGesture(tab)
if self.wait_action:
self.wait_action.RunAction(tab)
- if interaction is not None:
- interaction.End()
+ if self.automatically_record_interaction:
+ tab.ExecuteJavaScript('console.timeEnd("%s");' %
+ tir_module.TimelineInteractionRecord.GetJavaScriptMarker(
+ interaction_name, [tir_module.IS_SMOOTH]))
def RunGesture(self, tab):
raise NotImplementedError()
« no previous file with comments | « tools/telemetry/telemetry/page/actions/all_page_actions.py ('k') | tools/telemetry/telemetry/page/actions/javascript_click.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698