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

Unified Diff: tools/perf/page_sets/blob_workshop.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 | « no previous file | tools/perf/page_sets/google_pages.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/page_sets/blob_workshop.py
diff --git a/tools/perf/page_sets/blob_workshop.py b/tools/perf/page_sets/blob_workshop.py
index a766293f9d3d731a88ddf42215b011da52769660..8d873f9f9cc0bc6ee57f55f75d840f1bcb0734e6 100644
--- a/tools/perf/page_sets/blob_workshop.py
+++ b/tools/perf/page_sets/blob_workshop.py
@@ -25,9 +25,8 @@ class BlobCreateThenRead(page_module.Page):
for size_bytes in self._blob_sizes:
with action_runner.CreateInteraction('Action_CreateAndReadBlob',
repeatable=True):
- # TODO(catapult:#3028): Fix interpolation of JavaScript values.
action_runner.ExecuteJavaScript(
- 'createAndRead(' + str(size_bytes) + ');')
+ 'createAndRead({{ size }});', size=size_bytes)
action_runner.WaitForJavaScriptCondition(
'doneReading === true || errors', timeout_in_seconds=60)
@@ -51,8 +50,8 @@ class BlobMassCreate(page_module.Page):
for size_bytes in self._blob_sizes:
with action_runner.CreateInteraction('Action_CreateBlob',
repeatable=True):
- # TODO(catapult:#3028): Fix interpolation of JavaScript values.
- action_runner.ExecuteJavaScript('createBlob(' + str(size_bytes) + ');')
+ action_runner.ExecuteJavaScript(
+ 'createBlob({{ size }});', size=size_bytes)
# Read blobs
for _ in range(0, NUM_BLOB_MASS_CREATE_READS):
« no previous file with comments | « no previous file | tools/perf/page_sets/google_pages.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698