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

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: Addressed comments from bolian 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
« no previous file with comments | « tools/chrome_proxy/integration_tests/chrome_proxy_measurements.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ac7fd976c800ac1115593047ffc71834b622dfb6 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 AddResultsForClientVersion(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')
megjablon 2014/09/10 19:02:30 This doesn't print anything to %s ('%s: Response m
bengr 2014/09/12 20:36:41 Done.
+ 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)
« no previous file with comments | « tools/chrome_proxy/integration_tests/chrome_proxy_measurements.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698