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

Unified Diff: tools/perf/page_sets/top_25_smooth.py

Issue 1058013005: [Telemetry] Switch BeginGestureInteraction to CreateGestureInteraction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | tools/perf/page_sets/top_7_stress.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/page_sets/top_25_smooth.py
diff --git a/tools/perf/page_sets/top_25_smooth.py b/tools/perf/page_sets/top_25_smooth.py
index 1d614f33785b20817565f60e8762f7eb79cbb89b..6f42e505946dcd70eb21ccb7c5d3c752a5c49899 100644
--- a/tools/perf/page_sets/top_25_smooth.py
+++ b/tools/perf/page_sets/top_25_smooth.py
@@ -8,10 +8,8 @@ from page_sets import top_pages
def _IssueMarkerAndScroll(action_runner):
- interaction = action_runner.BeginGestureInteraction(
- 'ScrollAction')
- action_runner.ScrollPage()
- interaction.End()
+ with action_runner.CreateGestureInteraction('ScrollAction'):
+ action_runner.ScrollPage()
def _CreatePageClassWithSmoothInteractions(page_cls):
@@ -46,11 +44,9 @@ class GmailSmoothPage(top_pages.GmailPage):
});''')
action_runner.WaitForJavaScriptCondition(
'window.__scrollableElementForTelemetry != null')
- interaction = action_runner.BeginGestureInteraction(
- 'ScrollAction')
- action_runner.ScrollElement(
- element_function='window.__scrollableElementForTelemetry')
- interaction.End()
+ with action_runner.CreateGestureInteraction('ScrollAction'):
+ action_runner.ScrollElement(
+ element_function='window.__scrollableElementForTelemetry')
class GoogleCalendarSmoothPage(top_pages.GoogleCalendarPage):
@@ -58,10 +54,8 @@ class GoogleCalendarSmoothPage(top_pages.GoogleCalendarPage):
""" Why: productivity, top google properties """
def RunPageInteractions(self, action_runner):
- interaction = action_runner.BeginGestureInteraction(
- 'ScrollAction')
- action_runner.ScrollElement(selector='#scrolltimedeventswk')
- interaction.End()
+ with action_runner.CreateGestureInteraction('ScrollAction'):
+ action_runner.ScrollElement(selector='#scrolltimedeventswk')
class GoogleDocSmoothPage(top_pages.GoogleDocPage):
@@ -69,10 +63,8 @@ class GoogleDocSmoothPage(top_pages.GoogleDocPage):
""" Why: productivity, top google properties; Sample doc in the link """
def RunPageInteractions(self, action_runner):
- interaction = action_runner.BeginGestureInteraction(
- 'ScrollAction')
- action_runner.ScrollElement(selector='.kix-appview-editor')
- interaction.End()
+ with action_runner.CreateGestureInteraction('ScrollAction'):
+ action_runner.ScrollElement(selector='.kix-appview-editor')
class ESPNSmoothPage(top_pages.ESPNPage):
@@ -80,10 +72,8 @@ class ESPNSmoothPage(top_pages.ESPNPage):
""" Why: #1 sports """
def RunPageInteractions(self, action_runner):
- interaction = action_runner.BeginGestureInteraction(
- 'ScrollAction')
- action_runner.ScrollPage(left_start_ratio=0.1)
- interaction.End()
+ with action_runner.CreateGestureInteraction('ScrollAction'):
+ action_runner.ScrollPage(left_start_ratio=0.1)
class Top25SmoothPageSet(page_set_module.PageSet):
« no previous file with comments | « no previous file | tools/perf/page_sets/top_7_stress.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698