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

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

Issue 386023004: Cleanup while reading code: Move GetJavaScriptMarker to be a free function instead of static functi… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix tests. 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/action_runner.py
diff --git a/tools/telemetry/telemetry/page/actions/action_runner.py b/tools/telemetry/telemetry/page/actions/action_runner.py
index 66c103be90414feca3db054fa14038ed3e8678b4..e25a8ca4d66d5ca774f6f569184516f0a35589b0 100644
--- a/tools/telemetry/telemetry/page/actions/action_runner.py
+++ b/tools/telemetry/telemetry/page/actions/action_runner.py
@@ -17,7 +17,7 @@ from telemetry.page.actions.seek import SeekAction
from telemetry.page.actions.swipe import SwipeAction
from telemetry.page.actions.tap import TapAction
from telemetry.page.actions.wait import WaitForElementAction
-from telemetry.web_perf import timeline_interaction_record as tir_module
+from telemetry.web_perf import timeline_interaction_record
class ActionRunner(object):
@@ -51,11 +51,11 @@ class ActionRunner(object):
"""
flags = []
if is_smooth:
- flags.append(tir_module.IS_SMOOTH)
+ flags.append(timeline_interaction_record.IS_SMOOTH)
if is_responsive:
- flags.append(tir_module.IS_RESPONSIVE)
+ flags.append(timeline_interaction_record.IS_RESPONSIVE)
if repeatable:
- flags.append(tir_module.REPEATABLE)
+ flags.append(timeline_interaction_record.REPEATABLE)
interaction = Interaction(self._tab, label, flags)
interaction.Begin()
@@ -572,12 +572,12 @@ class Interaction(object):
assert not self._started
self._started = True
self._action_runner.ExecuteJavaScript('console.time("%s");' %
- tir_module.TimelineInteractionRecord.GetJavaScriptMarker(
+ timeline_interaction_record.GetJavaScriptMarker(
self._label, self._flags))
def End(self):
assert self._started
self._started = False
self._action_runner.ExecuteJavaScript('console.timeEnd("%s");' %
- tir_module.TimelineInteractionRecord.GetJavaScriptMarker(
+ timeline_interaction_record.GetJavaScriptMarker(
self._label, self._flags))
« no previous file with comments | « tools/perf/measurements/timeline_controller.py ('k') | tools/telemetry/telemetry/page/actions/action_runner_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698