From b94a8563e3fe462e1bafb7e0f183f514a6943227 Mon Sep 17 00:00:00 2001 From: sclittle Date: Tue, 6 Jan 2015 17:51:46 -0800 Subject: Expect resources to have DRP via header in header_validation test. Change the DRP header_validation telemetry test to expect that the DRP via header is present on all eligible responses. This makes it more consistent with the other tests, and causes it not to crash on Android Webview when the DRP is disabled. BUG=446343 Review URL: https://codereview.chromium.org/829393003 Cr-Commit-Position: refs/heads/master@{#310213} --- .../integration_tests/chrome_proxy_metrics.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py b/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py index 7a070f4..a92ef14 100644 --- a/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py +++ b/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py @@ -168,24 +168,16 @@ class ChromeProxyMetric(network_metrics.NetworkMetric): def AddResultsForHeaderValidation(self, tab, results): via_count = 0 - bypass_count = 0 for resp in self.IterResponses(tab): if resp.IsValidByViaHeader(): via_count += 1 else: - bypassed, _ = self.IsProxyBypassed(tab) - if tab and bypassed: - logging.warning('Proxy bypassed for %s', resp.response.url) - bypass_count += 1 - else: - r = resp.response - raise ChromeProxyMetricException, ( - '%s: Via header (%s) is not valid (refer=%s, status=%d)' % ( - r.url, r.GetHeader('Via'), r.GetHeader('Referer'), r.status)) + r = resp.response + raise ChromeProxyMetricException, ( + '%s: Via header (%s) is not valid (refer=%s, status=%d)' % ( + r.url, r.GetHeader('Via'), r.GetHeader('Referer'), r.status)) results.AddValue(scalar.ScalarValue( results.current_page, 'checked_via_header', 'count', via_count)) - results.AddValue(scalar.ScalarValue( - results.current_page, 'request_bypassed', 'count', bypass_count)) def AddResultsForClientVersion(self, tab, results): for resp in self.IterResponses(tab): -- cgit v1.1