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

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

Issue 655703002: Added integration tests for falling back from the HTTP proxy to direct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 6 years, 2 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 00ba5b57eb48be98fe3ec930371036a6123f0548..a2bc9f091ffc21fa92c0b3dad4e751e81d4cc6c5 100644
--- a/tools/chrome_proxy/integration_tests/chrome_proxy_measurements.py
+++ b/tools/chrome_proxy/integration_tests/chrome_proxy_measurements.py
@@ -260,6 +260,29 @@ class ChromeProxyClientVersion(ChromeProxyValidation):
self._metrics.AddResultsForClientVersion(tab, results)
+class ChromeProxyHTTPToDirectFallback(ChromeProxyValidation):
+ """Correctness measurement for HTTP proxy fallback to direct."""
+
+ def __init__(self):
+ super(ChromeProxyHTTPToDirectFallback, self).__init__(
+ restart_after_each_page=True)
+
+ def WillNavigateToPage(self, page, tab):
+ super(ChromeProxyHTTPToDirectFallback, self).WillNavigateToPage(page, tab)
+ # In order to have this test run starting from the HTTP fallback proxy,
+ # the startup URL is set such that it will trigger a proxy fallback.
+ # Verify that this is true before beginning the test proper.
+ proxies = [
+ self._metrics.effective_proxies['proxy'],
+ self._metrics.effective_proxies['fallback'],
+ self._metrics.effective_proxies['direct']]
+ bad_proxies = [self._metrics.effective_proxies['proxy']]
+ self._metrics.VerifyProxyInfo(tab, proxies, bad_proxies)
+
+ def AddResults(self, tab, results):
+ self._metrics.AddResultsForHTTPToDirectFallback(tab, results)
+
+
class ChromeProxySmoke(ChromeProxyValidation):
"""Smoke measurement for basic chrome proxy correctness."""

Powered by Google App Engine
This is Rietveld 408576698