summaryrefslogtreecommitdiffstats
path: root/tools/chrome_proxy
diff options
context:
space:
mode:
authorsclittle <sclittle@chromium.org>2015-01-06 17:51:46 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-07 01:53:07 +0000
commitb94a8563e3fe462e1bafb7e0f183f514a6943227 (patch)
treee426669a78384afb61c446d8c8433f411b6fa9b9 /tools/chrome_proxy
parentb65c33da5146e60f3c55cd4ade7527df049c26e5 (diff)
downloadchromium_src-b94a8563e3fe462e1bafb7e0f183f514a6943227.zip
chromium_src-b94a8563e3fe462e1bafb7e0f183f514a6943227.tar.gz
chromium_src-b94a8563e3fe462e1bafb7e0f183f514a6943227.tar.bz2
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}
Diffstat (limited to 'tools/chrome_proxy')
-rw-r--r--tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py16
1 files 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):