summaryrefslogtreecommitdiffstats
path: root/tools/chrome_proxy
diff options
context:
space:
mode:
authorbustamante <bustamante@google.com>2015-10-08 16:06:38 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-08 23:07:26 +0000
commitc3b0965e8a96763c78915b2543a9a0983084320f (patch)
tree6827dc71f7c46e48277212bdbf0ca0312cd34154 /tools/chrome_proxy
parent149194c90bf152689d14127a7bf54e49b5c8e545 (diff)
downloadchromium_src-c3b0965e8a96763c78915b2543a9a0983084320f.zip
chromium_src-c3b0965e8a96763c78915b2543a9a0983084320f.tar.gz
chromium_src-c3b0965e8a96763c78915b2543a9a0983084320f.tar.bz2
Add timeout to XHR request in the DRP check.
This change is under the theory that our initial request hangs for some reason, and blocks future requests from succeeding until the browser is realunched. By setting a timeout Chrome will give up after 15 seconds. BUG=539639 Review URL: https://codereview.chromium.org/1400693002 Cr-Commit-Position: refs/heads/master@{#353165}
Diffstat (limited to 'tools/chrome_proxy')
-rw-r--r--tools/chrome_proxy/common/chrome_proxy_measurements.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/chrome_proxy/common/chrome_proxy_measurements.py b/tools/chrome_proxy/common/chrome_proxy_measurements.py
index b7f7515..1628cce 100644
--- a/tools/chrome_proxy/common/chrome_proxy_measurements.py
+++ b/tools/chrome_proxy/common/chrome_proxy_measurements.py
@@ -27,6 +27,7 @@ def WaitForViaHeader(tab, url="http://check.googlezip.net/test.html"):
'function ProbeViaHeader(url, wanted_via) {'
'try {'
'var xmlhttp = new XMLHttpRequest();'
+ 'xmlhttp.timeout = 15;'
'xmlhttp.open("HEAD",url,false);'
'xmlhttp.send();'
'var via=xmlhttp.getResponseHeader("via");'