Index: tools/perf/page_sets/system_health/media_stories.py |
diff --git a/tools/perf/page_sets/system_health/media_stories.py b/tools/perf/page_sets/system_health/media_stories.py |
index 6a8501f92ba84dd18eb3eb8be153d992e39d2fe3..f195bf62f8c0951280dc8bda0ea7cbee4059bc16 100644 |
--- a/tools/perf/page_sets/system_health/media_stories.py |
+++ b/tools/perf/page_sets/system_health/media_stories.py |
@@ -46,10 +46,9 @@ class _MediaStory(system_health_story.SystemHealthStory): |
self.PLAY_DURATION - self._GetTimeInSeconds(action_runner)) |
def _GetTimeInSeconds(self, action_runner): |
- # TODO(catapult:#3028): Fix interpolation of JavaScript values. |
- time_func = ( |
- 'document.querySelector("%s").textContent' % self.TIME_SELECTOR) |
- minutes, seconds = action_runner.EvaluateJavaScript(time_func).split(':') |
+ minutes, seconds = action_runner.EvaluateJavaScript( |
+ 'document.querySelector({{ selector }}).textContent', |
+ selector=self.TIME_SELECTOR).split(':') |
return int(minutes * 60 + seconds) |