| 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)
|
|
|