Commit 7e150a90 authored by sclittle's avatar sclittle Committed by Commit bot

Remove proxy retry time condition from CORS bypass integration test.

This fixes the failing CORS bypass telemetry test for the data reduction
proxy. The CORS bypass test doesn't need to care what kind of bypass
was caused, just that the CORS request was bypassed.

Also made VerifyProxyInfo resilient to the actual and expected proxy
lists being ordered differently.

BUG=423916

Review URL: https://codereview.chromium.org/663333004

Cr-Commit-Position: refs/heads/master@{#301472}
parent 94c8f1ad
......@@ -257,6 +257,7 @@ class ChromeProxyMetric(network_metrics.NetworkMetric):
str(retry_time_high)))
def VerifyAllProxiesBypassed(self, tab):
"""Verify that all proxies are bypassed for 1 to 5 minutes."""
if tab:
info = GetProxyInfoFromNetworkInternals(tab)
if not info['enabled']:
......@@ -343,7 +344,6 @@ class ChromeProxyMetric(network_metrics.NetworkMetric):
'(eligible_response_count=%d, bypass_count=%d)\n' % (
eligible_response_count, bypass_count))
self.VerifyAllProxiesBypassed(tab)
results.AddValue(scalar.ScalarValue(
results.current_page, 'cors_bypass', 'count', bypass_count))
......@@ -407,8 +407,8 @@ class ChromeProxyMetric(network_metrics.NetworkMetric):
raise ChromeProxyMetricException, (
'Chrome proxy should be enabled. proxy info: %s' % info)
proxies = info['proxies']
if (proxies != expected_proxies and
proxies != self.ProxyListForDev(expected_proxies)):
if (set(proxies) != set(expected_proxies) and
set(proxies) != set(self.ProxyListForDev(expected_proxies))):
raise ChromeProxyMetricException, (
'Wrong effective proxies (%s). Expect: "%s"' % (
str(proxies), str(expected_proxies)))
......@@ -417,8 +417,8 @@ class ChromeProxyMetric(network_metrics.NetworkMetric):
if 'badProxies' in info and info['badProxies']:
bad_proxies = [p['proxy'] for p in info['badProxies']
if 'proxy' in p and p['proxy']]
if (bad_proxies != expected_bad_proxies and
bad_proxies != self.ProxyListForDev(expected_bad_proxies)):
if (set(bad_proxies) != set(expected_bad_proxies) and
set(bad_proxies) != set(self.ProxyListForDev(expected_bad_proxies))):
raise ChromeProxyMetricException, (
'Wrong bad proxies (%s). Expect: "%s"' % (
str(bad_proxies), str(expected_bad_proxies)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment