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 adcc24119d44203115f6ac398875be9ccb145e19..04f36c8b921ba83d1e839ab28317bb9d66504254 100644 |
--- a/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py |
+++ b/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py |
@@ -254,6 +254,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']: |
@@ -340,7 +341,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)) |
@@ -404,8 +404,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))) |
@@ -414,8 +414,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))) |