From b27d6c92ef8c0c28cb721e1f923ce84883d92c23 Mon Sep 17 00:00:00 2001 From: bustamante Date: Mon, 21 Sep 2015 15:39:25 -0700 Subject: [PATCH] Verify the page has begun loading before doing a DRP check. In the chrome_proxy_benchmark.client_version.synthetic test it will consistently try to make the DRP check before the javascript in the page has been loaded, causing the case to fail. BUG=533730 Review URL: https://codereview.chromium.org/1360673002 Cr-Commit-Position: refs/heads/master@{#350049} --- tools/chrome_proxy/common/chrome_proxy_measurements.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/chrome_proxy/common/chrome_proxy_measurements.py b/tools/chrome_proxy/common/chrome_proxy_measurements.py index 542f7465d0cd..7cdef14d6530 100644 --- a/tools/chrome_proxy/common/chrome_proxy_measurements.py +++ b/tools/chrome_proxy/common/chrome_proxy_measurements.py @@ -35,6 +35,8 @@ def WaitForViaHeader(tab, url="http://check.googlezip.net/test.html"): 'Waiting for Chrome to start using the DRP...' '')) + # Ensure the page has started loading before attempting the DRP check. + tab.WaitForJavaScriptExpression('performance.timing.loadEventStart', 300) tab.WaitForJavaScriptExpression( 'ProbeViaHeader("%s", "%s")' % (url, metrics.CHROME_PROXY_VIA_HEADER), 300) -- 2.11.4.GIT