Index: tools/telemetry/telemetry/page/record_wpr.py |
diff --git a/tools/telemetry/telemetry/page/record_wpr.py b/tools/telemetry/telemetry/page/record_wpr.py |
old mode 100755 |
new mode 100644 |
index a864cc67ce1fc9e782d3ac81251d4f7a2d52097e..114c7baad01d92f8d5d4b65962baac092f6f2eae |
--- a/tools/telemetry/telemetry/page/record_wpr.py |
+++ b/tools/telemetry/telemetry/page/record_wpr.py |
@@ -1,10 +1,9 @@ |
-#!/usr/bin/env python |
dtu
2014/08/13 05:47:07
Might have to disable executable bit?
tonyg
2014/08/13 05:51:34
I did. The unified diff shows the permissions chan
|
# Copyright 2012 The Chromium Authors. All rights reserved. |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
+ |
import logging |
import sys |
-import time |
from telemetry import benchmark |
from telemetry.core import browser_options |
@@ -15,6 +14,7 @@ from telemetry.page import page_set |
from telemetry.page import page_test |
from telemetry.page import profile_creator |
from telemetry.page import test_expectations |
+from telemetry.core import util |
dtu
2014/08/13 05:47:07
out of order
tonyg
2014/08/13 05:51:34
Oops, fixed.
|
from telemetry.results import results_options |
@@ -52,13 +52,7 @@ class RecorderPageTest(page_test.PageTest): # pylint: disable=W0223 |
def RunPage(self, page, tab, results): |
tab.WaitForDocumentReadyStateToBeComplete() |
- |
- # When recording, sleep to catch any resources that load post-onload. |
- # TODO(tonyg): This should probably monitor resource timing for activity |
- # and sleep until 2s since the last network event with some timeout like |
- # 20s. We could wrap this up as WaitForNetworkIdle() and share with the |
- # speed index metric. |
- time.sleep(3) |
+ util.WaitFor(tab.HasReachedQuiescence, 30) |
dtu
2014/08/13 05:47:07
30 is too long for the unit tests
tonyg
2014/08/13 05:51:34
They don't get anywhere near this because the simp
|
if self.page_test: |
self._action_name_to_run = self.page_test.action_name_to_run |