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

Unified Diff: tools/perf/page_sets/repaint_helpers.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/polymer.py ('k') | tools/perf/page_sets/system_health/browsing_stories.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/page_sets/repaint_helpers.py
diff --git a/tools/perf/page_sets/repaint_helpers.py b/tools/perf/page_sets/repaint_helpers.py
index 08bd48f0d75473bcb146ab7a0fe6a743231171b1..a08025c3329ffbfb80d59da0091a975a88940ae1 100644
--- a/tools/perf/page_sets/repaint_helpers.py
+++ b/tools/perf/page_sets/repaint_helpers.py
@@ -26,9 +26,10 @@ def Repaint(action_runner, mode='viewport', width=None, height=None):
chrome.gpuBenchmarking.runMicroBenchmark(
"invalidation_benchmark",
function(value) {},
- """ + str(args) + """
+ {{ args }}
);
- """)
+ """,
+ args=args)
micro_benchmark_id = action_runner.EvaluateJavaScript(
'window.benchmark_results.id')
@@ -39,14 +40,14 @@ def Repaint(action_runner, mode='viewport', width=None, height=None):
with action_runner.CreateInteraction('Repaint'):
action_runner.RepaintContinuously(seconds=5)
- # TODO(catapult:#3028): Fix interpolation of JavaScript values.
action_runner.ExecuteJavaScript("""
window.benchmark_results.message_handled =
chrome.gpuBenchmarking.sendMessageToMicroBenchmark(
- """ + str(micro_benchmark_id) + """, {
- "notify_done": true
- });
- """)
+ {{ micro_benchmark_id }}, {
+ "notify_done": true
+ });
+ """,
+ micro_benchmark_id=micro_benchmark_id)
def WaitThenRepaint(action_runner):
« no previous file with comments | « tools/perf/page_sets/polymer.py ('k') | tools/perf/page_sets/system_health/browsing_stories.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698