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

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

Issue 2206363002: Added integration test to Chrome Proxy to verify direct connection on remote site timeout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added an integration test to Chrome Proxy to verify direct connection on proxy HTTP timeout 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..c5a53c784d292b62cd2645b07102322c8f8b35e3 100644
--- a/tools/chrome_proxy/integration_tests/chrome_proxy_measurements.py
+++ b/tools/chrome_proxy/integration_tests/chrome_proxy_measurements.py
@@ -13,6 +13,26 @@ from metrics import loading
from telemetry.core import exceptions, util
from telemetry.page import page_test
+BLACKHOLE_SERVER_URL = 'http://blackhole-1470152441488.appspot.com'
+
+class ChromeProxyClientBypassOnTimeout(ChromeProxyValidation):
+ """Tests that client bypasses proxy after proxy timeouts on HTTP
+ response.
+ """
+
+ def __init__(self):
+ super(ChromeProxyClientBypassOnTimeout, self).__init__(
+ restart_after_each_page=True,
+ metrics=metrics.ChromeProxyMetric())
+
+ def CustomizeBrowserOptions(self, options):
+ super(ChromeProxyClientBypassOnTimeout, self).CustomizeBrowserOptions(options)
bustamante 2016/08/03 21:40:55 Nit - this line is over 80 characters, and should
Robert Ogden 2016/08/08 16:46:41 Done.
+ self._is_chrome_proxy_enabled = False
+ options.AppendExtraBrowserArgs('--data-reduction-proxy-http-proxies='
+ + BLACKHOLE_SERVER_URL)
+
+ def AddResults(self, tab, results):
+ self._metrics.AddResultsForClientBypassOnTimeout(tab, results)
class ChromeProxyDataSaving(page_test.PageTest):
"""Chrome proxy data saving measurement."""
@@ -677,4 +697,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