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

Unified Diff: tools/perf/page_sets/login_helpers/login_utils.py

Issue 2618333006: [tools/perf] Fix JavaScript interpolation in action_runner calls (Closed)
Patch Set: fix a few more interpolations Created 3 years, 11 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/login_helpers/google_login.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/login_helpers/login_utils.py
diff --git a/tools/perf/page_sets/login_helpers/login_utils.py b/tools/perf/page_sets/login_helpers/login_utils.py
index 296ed20f140345f4ec9be55d3f343f1889a4f115..710c415a659dbf53c91ff6149a8887b4d7cfb4fe 100644
--- a/tools/perf/page_sets/login_helpers/login_utils.py
+++ b/tools/perf/page_sets/login_helpers/login_utils.py
@@ -45,10 +45,9 @@ def InputWithSelector(action_runner, input_text, input_selector):
possible exceptions.
"""
action_runner.WaitForElement(selector=input_selector)
- # TODO(catapult:#3028): Fix interpolation of JavaScript values.
action_runner.ExecuteJavaScript(
- 'document.querySelector("%s").value = "%s";' %
- (input_selector, input_text))
+ 'document.querySelector({{ selector }}).value = {{ value }};',
+ selector=input_selector, value=input_text)
def InputForm(action_runner, input_text, input_id, form_id=None):
"""Sets the text value of an input field in a form on the page.
« no previous file with comments | « tools/perf/page_sets/login_helpers/google_login.py ('k') | tools/perf/page_sets/polymer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698