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

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

Issue 544463002: Integration test for data reduction proxy version header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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_metrics.py
diff --git a/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py b/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py
index fd26a2d9254a03c22d7cf11930cfb4ed033b995f..d479ecd6c02ac29bb9e38eab97a7c8458fda91c9 100644
--- a/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py
+++ b/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py
@@ -153,6 +153,18 @@ class ChromeProxyMetric(network_metrics.NetworkMetric):
results.AddValue(scalar.ScalarValue(
results.current_page, 'request_bypassed', 'count', bypass_count))
+ def AddResultsForVersionTest(self, tab, results):
+ for resp in self.IterResponses(tab):
+ if resp.response.status != 200:
+ r = resp.response
+ raise ChromeProxyMetricException, ('%s: Response is not 200: %d' %
+ (r.url, r.status))
+ if not resp.IsValidByViaHeader():
+ raise ChromeProxyMetricException, ('%s: Response missing via header')
+ results.AddValue(scalar.ScalarValue(
+ results.current_page, 'version_test', 'count', 1))
+
+
def IsProxyBypassed(self, tab):
""" Returns True if all configured proxies are bypassed."""
info = GetProxyInfoFromNetworkInternals(tab)

Powered by Google App Engine
This is Rietveld 408576698