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

Unified Diff: tools/perf/page_sets/polymer.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/key_silk_cases.py ('k') | tools/perf/page_sets/top_10.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/page_sets/polymer.py
diff --git a/tools/perf/page_sets/polymer.py b/tools/perf/page_sets/polymer.py
index dc04c15ca6a9247abee8fd604af9b9428ef06bdb..84b57d330f67a1f38eba9ea375a8b278137b5862 100644
--- a/tools/perf/page_sets/polymer.py
+++ b/tools/perf/page_sets/polymer.py
@@ -92,10 +92,8 @@ class PolymerShadowPage(PolymerPage):
self.archive_data_file = 'data/polymer.json'
def RunSmoothness(self, action_runner):
- action_runner.RunAction(JavascriptAction(
- {
- 'expression': "document.getElementById('fab').scrollIntoView()"
- }))
+ action_runner.ExecuteJavaScript(
+ "document.getElementById('fab').scrollIntoView()")
action_runner.RunAction(WaitAction(
{
'seconds': 5
@@ -105,12 +103,8 @@ class PolymerShadowPage(PolymerPage):
def AnimateShadow(self, action_runner, eid):
for i in range(1, 6):
- action_runner.RunAction(JavascriptAction(
- {
- 'expression': '''
- document.getElementById("{0}").z = {1}
- '''.format(eid, i)
- }))
+ action_runner.ExecuteJavaScript(
+ 'document.getElementById("{0}").z = {1}'.format(eid, i))
action_runner.RunAction(WaitAction(
{
'seconds': 1
« no previous file with comments | « tools/perf/page_sets/key_silk_cases.py ('k') | tools/perf/page_sets/top_10.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698