| Index: tools/perf/metrics/speedindex.py
|
| diff --git a/tools/perf/metrics/speedindex.py b/tools/perf/metrics/speedindex.py
|
| index e743f1848b90901b277e5507511052c61aad00ab..6e86d67c3d2aaad31e71690faa0c701d56152bae 100644
|
| --- a/tools/perf/metrics/speedindex.py
|
| +++ b/tools/perf/metrics/speedindex.py
|
| @@ -78,23 +78,7 @@ class SpeedIndexMetric(Metric):
|
| True if 2 seconds have passed since last resource received, false
|
| otherwise.
|
| """
|
| - if self._is_finished:
|
| - return True
|
| -
|
| - # The script that provides the function window.timeSinceLastResponseMs()
|
| - # needs to be loaded for this function, but it must be loaded AFTER
|
| - # the Start method is called, because if the Start method is called in
|
| - # the PageMeasurement's WillNavigateToPage function, then it will
|
| - # not be available here. The script should only be re-loaded once per page
|
| - # so that variables in the script get reset only for a new page.
|
| - if not self._script_is_loaded:
|
| - tab.ExecuteJavaScript(self._js)
|
| - self._script_is_loaded = True
|
| -
|
| - time_since_last_response_ms = tab.EvaluateJavaScript(
|
| - "window.timeSinceLastResponseAfterLoadMs()")
|
| - self._is_finished = time_since_last_response_ms > 2000
|
| - return self._is_finished
|
| + return tab.HasReachedQuiescence()
|
|
|
|
|
| class SpeedIndexImpl(object):
|
|
|