Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: tools/chrome_proxy/integration_tests/chrome_proxy_measurements.py

Issue 553543004: Update metrics verification for dev-proxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: verification for dev proxy Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import base64 5 import base64
6 import logging 6 import logging
7 import urlparse 7 import urlparse
8 8
9 from integration_tests import chrome_proxy_metrics as metrics 9 from integration_tests import chrome_proxy_metrics as metrics
10 from metrics import loading 10 from metrics import loading
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 probe_url = GetResponseOverrideURL( 176 probe_url = GetResponseOverrideURL(
177 _TEST_SERVER_DEFAULT_URL, 177 _TEST_SERVER_DEFAULT_URL,
178 respBody='not OK') 178 respBody='not OK')
179 options.AppendExtraBrowserArgs( 179 options.AppendExtraBrowserArgs(
180 '--data-reduction-proxy-probe-url=%s' % probe_url) 180 '--data-reduction-proxy-probe-url=%s' % probe_url)
181 181
182 def AddResults(self, tab, results): 182 def AddResults(self, tab, results):
183 self._metrics.AddResultsForHTTPFallback(tab, results) 183 self._metrics.AddResultsForHTTPFallback(tab, results)
184 184
185 185
186 # Depends on the fix of http://crbug.com/330342.
187 class ChromeProxyHTTPFallbackViaHeader(ChromeProxyValidation): 186 class ChromeProxyHTTPFallbackViaHeader(ChromeProxyValidation):
188 """Correctness measurement for proxy fallback. 187 """Correctness measurement for proxy fallback.
189 188
190 In this test, the configured proxy is the chromeproxy-test server which 189 In this test, the configured proxy is the chromeproxy-test server which
191 will send back a response without the expected Via header. Chrome is 190 will send back a response without the expected Via header. Chrome is
192 expected to use the fallback proxy and add the configured proxy to the 191 expected to use the fallback proxy and add the configured proxy to the
193 bad proxy list. 192 bad proxy list.
194 """ 193 """
195 194
196 def __init__(self): 195 def __init__(self):
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 ], 242 ],
244 'bypass': [self._metrics.AddResultsForBypass], 243 'bypass': [self._metrics.AddResultsForBypass],
245 'safebrowsing': [self._metrics.AddResultsForSafebrowsing], 244 'safebrowsing': [self._metrics.AddResultsForSafebrowsing],
246 } 245 }
247 if not self._page.name in page_to_metrics: 246 if not self._page.name in page_to_metrics:
248 raise page_test.MeasurementFailure( 247 raise page_test.MeasurementFailure(
249 'Invalid page name (%s) in smoke. Page name must be one of:\n%s' % ( 248 'Invalid page name (%s) in smoke. Page name must be one of:\n%s' % (
250 self._page.name, page_to_metrics.keys())) 249 self._page.name, page_to_metrics.keys()))
251 for add_result in page_to_metrics[self._page.name]: 250 for add_result in page_to_metrics[self._page.name]:
252 add_result(tab, results) 251 add_result(tab, results)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698