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

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

Issue 971073002: Make Data Saver integration test use new secure proxy check URL flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
199 199
200 class ChromeProxyHTTPFallbackProbeURL(ChromeProxyValidation): 200 class ChromeProxyHTTPFallbackProbeURL(ChromeProxyValidation):
201 """Correctness measurement for proxy fallback. 201 """Correctness measurement for proxy fallback.
202 202
203 In this test, the probe URL does not return 'OK'. Chrome is expected 203 In this test, the probe URL does not return 'OK'. Chrome is expected
204 to use the fallback proxy. 204 to use the fallback proxy.
205 """ 205 """
206 206
207 def __init__(self): 207 def __init__(self):
208 super(ChromeProxyHTTPFallbackProbeURL, self).__init__() 208 super(ChromeProxyHTTPFallbackProbeURL, self).__init__(
209 restart_after_each_page=True)
bengr 2015/03/03 17:49:29 I suppose this is ok, but in the future, please do
sclittle 2015/03/03 18:14:35 OK.
209 210
210 def CustomizeBrowserOptions(self, options): 211 def CustomizeBrowserOptions(self, options):
211 super(ChromeProxyHTTPFallbackProbeURL, 212 super(ChromeProxyHTTPFallbackProbeURL,
212 self).CustomizeBrowserOptions(options) 213 self).CustomizeBrowserOptions(options)
213 # Use the test server probe URL which returns the response 214 # Use the test server probe URL which returns the response
214 # body as specified by respBody. 215 # body as specified by respBody.
215 probe_url = GetResponseOverrideURL( 216 probe_url = GetResponseOverrideURL(respBody='not OK')
216 respBody='not OK')
217 options.AppendExtraBrowserArgs( 217 options.AppendExtraBrowserArgs(
218 '--data-reduction-proxy-probe-url=%s' % probe_url) 218 '--data-reduction-proxy-secure-proxy-check-url=%s' % probe_url)
219 219
220 def AddResults(self, tab, results): 220 def AddResults(self, tab, results):
221 self._metrics.AddResultsForHTTPFallback(tab, results) 221 self._metrics.AddResultsForHTTPFallback(tab, results)
222 222
223 223
224 class ChromeProxyHTTPFallbackViaHeader(ChromeProxyValidation): 224 class ChromeProxyHTTPFallbackViaHeader(ChromeProxyValidation):
225 """Correctness measurement for proxy fallback. 225 """Correctness measurement for proxy fallback.
226 226
227 In this test, the configured proxy is the chromeproxy-test server which 227 In this test, the configured proxy is the chromeproxy-test server which
228 will send back a response without the expected Via header. Chrome is 228 will send back a response without the expected Via header. Chrome is
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 self._metrics.AddResultsForDataSaving, 358 self._metrics.AddResultsForDataSaving,
359 ], 359 ],
360 'bypass': [self._metrics.AddResultsForBypass], 360 'bypass': [self._metrics.AddResultsForBypass],
361 } 361 }
362 if not self._page.name in page_to_metrics: 362 if not self._page.name in page_to_metrics:
363 raise page_test.MeasurementFailure( 363 raise page_test.MeasurementFailure(
364 'Invalid page name (%s) in smoke. Page name must be one of:\n%s' % ( 364 'Invalid page name (%s) in smoke. Page name must be one of:\n%s' % (
365 self._page.name, page_to_metrics.keys())) 365 self._page.name, page_to_metrics.keys()))
366 for add_result in page_to_metrics[self._page.name]: 366 for add_result in page_to_metrics[self._page.name]:
367 add_result(tab, results) 367 add_result(tab, results)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698