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

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

Issue 2719853003: [Telemetry refactor] Drop "2" from method calls to JS API (Closed)
Patch Set: Created 3 years, 10 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/oortonline.py ('k') | tools/perf/page_sets/repaint_helpers.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 7a9c26b9c0d25aa6b8497c6c5245abefe1d16d37..47665aa9fbc6eb24e28e3a84802fe22c8c2d5743 100644
--- a/tools/perf/page_sets/polymer.py
+++ b/tools/perf/page_sets/polymer.py
@@ -40,7 +40,7 @@ class PolymerPage(page_module.Page):
def RunNavigateSteps(self, action_runner):
super(PolymerPage, self).RunNavigateSteps(action_runner)
- action_runner.WaitForJavaScriptCondition2(
+ action_runner.WaitForJavaScriptCondition(
'window.__polymer_ready')
@@ -70,7 +70,7 @@ class PolymerCalculatorPage(PolymerPage):
def SlidePanel(self, action_runner):
# only bother with this interaction if the drawer is hidden
- opened = action_runner.EvaluateJavaScript2('''
+ opened = action_runner.EvaluateJavaScript('''
(function() {
var outer = document.querySelector("body /deep/ #outerPanels");
return outer.opened || outer.wideMode;
@@ -88,7 +88,7 @@ class PolymerCalculatorPage(PolymerPage):
).shadowRoot.querySelector(
'.handle-bar'
)''')
- action_runner.WaitForJavaScriptCondition2('''
+ action_runner.WaitForJavaScriptCondition('''
var outer = document.querySelector("body /deep/ #outerPanels");
outer.opened || outer.wideMode;''')
@@ -102,7 +102,7 @@ class PolymerShadowPage(PolymerPage):
def PerformPageInteractions(self, action_runner):
with action_runner.CreateInteraction('ScrollAndShadowAnimation'):
- action_runner.ExecuteJavaScript2(
+ action_runner.ExecuteJavaScript(
"document.getElementById('fab').scrollIntoView()")
action_runner.Wait(5)
self.AnimateShadow(action_runner, 'card')
@@ -112,7 +112,7 @@ class PolymerShadowPage(PolymerPage):
def AnimateShadow(self, action_runner, eid):
for i in range(1, 6):
- action_runner.ExecuteJavaScript2(
+ action_runner.ExecuteJavaScript(
'document.getElementById({{ eid }}).z = {{ i }}', eid=eid, i=i)
action_runner.Wait(1)
@@ -138,14 +138,14 @@ class PolymerSampler(PolymerPage):
def RunNavigateSteps(self, action_runner):
super(PolymerSampler, self).RunNavigateSteps(action_runner)
- action_runner.ExecuteJavaScript2("""
+ action_runner.ExecuteJavaScript("""
window.Polymer.whenPolymerReady(function() {
{{ @iframe }}.contentWindow.Polymer.whenPolymerReady(function() {
window.__polymer_ready = true;
})
});
""", iframe=self.iframe_js)
- action_runner.WaitForJavaScriptCondition2(
+ action_runner.WaitForJavaScriptCondition(
'window.__polymer_ready')
def PerformPageInteractions(self, action_runner):
@@ -196,13 +196,13 @@ class PolymerSampler(PolymerPage):
selector='body %s:not([disabled]):not([active])' % widget_type)
roles_count_query = element_list_query + '.length'
- for i in range(action_runner.EvaluateJavaScript2(roles_count_query)):
+ for i in range(action_runner.EvaluateJavaScript(roles_count_query)):
element_query = js_template.Render(
'{{ @query }}[{{ i }}]', query=element_list_query, i=i)
- if action_runner.EvaluateJavaScript2(
+ if action_runner.EvaluateJavaScript(
element_query + '.offsetParent != null'):
# Only try to tap on visible elements (offsetParent != null)
- action_runner.ExecuteJavaScript2(element_query + '.scrollIntoView()')
+ action_runner.ExecuteJavaScript(element_query + '.scrollIntoView()')
action_runner.Wait(1) # wait for page to settle after scrolling
action_function(action_runner, element_query)
« no previous file with comments | « tools/perf/page_sets/oortonline.py ('k') | tools/perf/page_sets/repaint_helpers.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698