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

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

Issue 744703003: Reduce DRP telemetry tests' dependence on net-internals#proxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased on master Created 6 years 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 | tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py » ('j') | 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 # Attempt to load a page through the nonexistent primary proxy in order to 303 # Attempt to load a page through the nonexistent primary proxy in order to
304 # cause a proxy fallback, and have this test run starting from the HTTP 304 # cause a proxy fallback, and have this test run starting from the HTTP
305 # fallback proxy. 305 # fallback proxy.
306 tab.Navigate(_TEST_SERVER_DEFAULT_URL) 306 tab.Navigate(_TEST_SERVER_DEFAULT_URL)
307 tab.WaitForJavaScriptExpression('performance.timing.loadEventStart', 300) 307 tab.WaitForJavaScriptExpression('performance.timing.loadEventStart', 300)
308 308
309 proxies = [ 309 proxies = [
310 'nonexistent.googlezip.net:80', 310 'nonexistent.googlezip.net:80',
311 self._metrics.effective_proxies['fallback'], 311 self._metrics.effective_proxies['fallback'],
312 self._metrics.effective_proxies['direct']] 312 self._metrics.effective_proxies['direct']]
313 # TODO(sclittle): Remove this dependency on net-internals#proxy once an
314 # alternative method of verifying that Chrome is on the fallback proxy
315 # exists.
313 self._metrics.VerifyProxyInfo(tab, proxies, proxies[:1]) 316 self._metrics.VerifyProxyInfo(tab, proxies, proxies[:1])
314 317
315 def AddResults(self, tab, results): 318 def AddResults(self, tab, results):
316 self._metrics.AddResultsForHTTPToDirectFallback(tab, results) 319 self._metrics.AddResultsForHTTPToDirectFallback(tab, results)
317 320
318 321
319 class ChromeProxyExplicitBypass(ChromeProxyValidation): 322 class ChromeProxyExplicitBypass(ChromeProxyValidation):
320 """Correctness measurement for explicit proxy bypasses. 323 """Correctness measurement for explicit proxy bypasses.
321 324
322 In this test, the configured proxy is the chromeproxy-test server which 325 In this test, the configured proxy is the chromeproxy-test server which
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 ], 391 ],
389 'bypass': [self._metrics.AddResultsForBypass], 392 'bypass': [self._metrics.AddResultsForBypass],
390 'safebrowsing': [self._metrics.AddResultsForSafebrowsing], 393 'safebrowsing': [self._metrics.AddResultsForSafebrowsing],
391 } 394 }
392 if not self._page.name in page_to_metrics: 395 if not self._page.name in page_to_metrics:
393 raise page_test.MeasurementFailure( 396 raise page_test.MeasurementFailure(
394 'Invalid page name (%s) in smoke. Page name must be one of:\n%s' % ( 397 'Invalid page name (%s) in smoke. Page name must be one of:\n%s' % (
395 self._page.name, page_to_metrics.keys())) 398 self._page.name, page_to_metrics.keys()))
396 for add_result in page_to_metrics[self._page.name]: 399 for add_result in page_to_metrics[self._page.name]:
397 add_result(tab, results) 400 add_result(tab, results)
OLDNEW
« no previous file with comments | « no previous file | tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698