Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Unified Diff: tools/chrome_proxy/integration_tests/chrome_proxy_measurements.py

Issue 2227163002: Added integration test to Chrome Proxy to verify fallback to HTTP after bad HTTPS response from pro… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/chrome_proxy/integration_tests/chrome_proxy_measurements.py
diff --git a/tools/chrome_proxy/integration_tests/chrome_proxy_measurements.py b/tools/chrome_proxy/integration_tests/chrome_proxy_measurements.py
index 7c05b9517ef276252dfb6421111ff10ac04a47e0..3c24d13a450631c787e8a14ca7bfb2c576efc862 100644
--- a/tools/chrome_proxy/integration_tests/chrome_proxy_measurements.py
+++ b/tools/chrome_proxy/integration_tests/chrome_proxy_measurements.py
@@ -181,6 +181,23 @@ def GetResponseOverrideURL(url=_TEST_SERVER_DEFAULT_URL, respStatus=0,
else:
return url + '?' + "&".join(queries)
+class ChromeProxyBadHTTPSFallback(ChromeProxyValidation):
+ """Checks the client falls back to HTTP proxy when HTTPS proxy errors."""
+
+ def __init__(self):
+ super(ChromeProxyBadHTTPSFallback, self).__init__(
+ restart_after_each_page=True,
+ metrics=metrics.ChromeProxyMetric())
+ self._is_chrome_proxy_enabled = True
+
+ def CustomizeBrowserOptions(self, options):
+ super(ChromeProxyBadHTTPSFallback, self).CustomizeBrowserOptions(
+ options)
+ options.AppendExtraBrowserArgs('--data-reduction-proxy-http-proxies='
+ 'https://%s;http://compress.googlezip.net' % _TEST_SERVER)
bustamante 2016/08/12 20:01:57 In some cases we'll want to set the proxy to an in
Robert Ogden 2016/08/15 17:13:14 Yes, and it can be overridden from the command lin
+
+ def AddResults(self, tab, results):
+ self._metrics.AddResultsForBadHTTPSFallback(tab, results)
class ChromeProxyHTTPFallbackProbeURL(ChromeProxyValidation):
"""Correctness measurement for proxy fallback.
@@ -677,4 +694,4 @@ class ChromeProxyPingback(ChromeProxyValidation):
'--enable-stats-collection-bindings')
def AddResults(self, tab, results):
- self._metrics.AddResultsForPingback(tab, results)
+ self._metrics.AddResultsForPingback(tab, results)

Powered by Google App Engine
This is Rietveld 408576698