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

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

Issue 313383002: Cleanup interaction creation and add ExecuteJavaScript to action_runner.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « tools/perf/page_sets/image_decoding_measurement.py ('k') | tools/perf/page_sets/polymer.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/page_sets/key_silk_cases.py
diff --git a/tools/perf/page_sets/key_silk_cases.py b/tools/perf/page_sets/key_silk_cases.py
index 4a1482988f0a3f3cd639fc9d6d63967ec9381b44..a55bb4de8011ab82286cba95bb51ec697d602fde 100644
--- a/tools/perf/page_sets/key_silk_cases.py
+++ b/tools/perf/page_sets/key_silk_cases.py
@@ -5,7 +5,6 @@
from telemetry.page.actions.all_page_actions import *
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
-from telemetry.web_perf import timeline_interaction_record as tir_module
class KeySilkCasesPage(page_module.Page):
@@ -299,11 +298,11 @@ class Page16(KeySilkCasesPage):
}''',
'speed': 5000
}))
- action_runner.BeginInteraction('Wait', [tir_module.IS_SMOOTH])
+ interaction = action_runner.BeginInteraction('Wait', is_smooth=True)
action_runner.RunAction(WaitAction({
'javascript': 'document.getElementsByClassName("message").length < 18'
}))
- action_runner.EndInteraction('Wait', [tir_module.IS_SMOOTH])
+ interaction.End()
def RunSmoothness(self, action_runner):
self.SwipeToDismiss(action_runner)
@@ -391,11 +390,11 @@ class Page19(KeySilkCasesPage):
{
'selector': '#menu-button'
}))
- action_runner.BeginInteraction('Wait', [tir_module.IS_SMOOTH])
+ interaction = action_runner.BeginInteraction('Wait', is_smooth=True)
action_runner.RunAction(WaitAction({
'javascript': 'document.getElementById("nav-drawer").active'
}))
- action_runner.EndInteraction('Wait', [tir_module.IS_SMOOTH])
+ interaction.End()
def RunNavigateSteps(self, action_runner):
@@ -535,9 +534,9 @@ class Page23(KeySilkCasesPage):
'scroll_distance_function':
'function() { return window.innerHeight / 2; }'
}))
- action_runner.BeginInteraction('Wait', [tir_module.IS_SMOOTH])
+ interaction = action_runner.BeginInteraction('Wait', is_smooth=True)
action_runner.RunAction(WaitAction({'seconds' : 1}))
- action_runner.EndInteraction('Wait', [tir_module.IS_SMOOTH])
+ interaction.End()
class Page24(KeySilkCasesPage):
@@ -600,9 +599,9 @@ class Page25(KeySilkCasesPage):
callback(document.getElementById(':f'));
}'''
}))
- action_runner.BeginInteraction('Wait', [tir_module.IS_SMOOTH])
+ interaction = action_runner.BeginInteraction('Wait', is_smooth=True)
action_runner.RunAction(WaitAction({'seconds' : 1}))
- action_runner.EndInteraction('Wait', [tir_module.IS_SMOOTH])
+ interaction.End()
class Page26(KeySilkCasesPage):
« no previous file with comments | « tools/perf/page_sets/image_decoding_measurement.py ('k') | tools/perf/page_sets/polymer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698