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

Side by Side Diff: tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/explicit_bypass.py

Issue 659333004: Added several new bypass telemetry tests for the data reduction proxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Fixed indentation in VerifyAllProxiesBypassed Created 6 years, 2 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
(Empty)
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
3 # found in the LICENSE file.
4
5 from integration_tests import chrome_proxy_measurements as measurements
6 from integration_tests import chrome_proxy_metrics as metrics
7 from telemetry.page import page as page_module
8 from telemetry.page import page_set as page_set_module
9
10
11 class ExplicitBypassPage(page_module.Page):
12
bengr 2014/10/17 23:24:07 comment?
sclittle 2014/10/17 23:42:33 Done.
13 def __init__(self,
14 url,
15 page_set,
16 num_bypassed_proxies,
17 bypass_seconds_low,
18 bypass_seconds_high):
19 super(ExplicitBypassPage, self).__init__(url=url, page_set=page_set)
20 self.num_bypassed_proxies = num_bypassed_proxies
21 self.bypass_seconds_low = bypass_seconds_low
22 self.bypass_seconds_high = bypass_seconds_high
23
24
25 class ExplicitBypassPageSet(page_set_module.PageSet):
26 """ Chrome proxy test sites """
27
28 def __init__(self):
29 super(ExplicitBypassPageSet, self).__init__()
30
31 # Test page for "Chrome-Proxy: bypass=0".
32 self.AddPage(ExplicitBypassPage(
33 url=measurements.GetResponseOverrideURL(
34 respHeader='{"Chrome-Proxy":["bypass=0"],'
35 '"Via":["1.1 Chrome-Compression-Proxy"]}'),
36 page_set=self,
37 num_bypassed_proxies=1,
38 bypass_seconds_low=metrics.DEFAULT_BYPASS_MIN_SECONDS,
39 bypass_seconds_high=metrics.DEFAULT_BYPASS_MAX_SECONDS))
40
41 # Test page for "Chrome-Proxy: bypass=3600".
42 self.AddPage(ExplicitBypassPage(
43 url=measurements.GetResponseOverrideURL(
44 respHeader='{"Chrome-Proxy":["bypass=3600"],'
45 '"Via":["1.1 Chrome-Compression-Proxy"]}'),
46 page_set=self,
47 num_bypassed_proxies=1,
48 bypass_seconds_low=3600,
49 bypass_seconds_high=3600))
50
51 # Test page for "Chrome-Proxy: block=0".
52 self.AddPage(ExplicitBypassPage(
53 url=measurements.GetResponseOverrideURL(
54 respHeader='{"Chrome-Proxy":["block=0"],'
55 '"Via":["1.1 Chrome-Compression-Proxy"]}'),
56 page_set=self,
57 num_bypassed_proxies=2,
58 bypass_seconds_low=metrics.DEFAULT_BYPASS_MIN_SECONDS,
59 bypass_seconds_high=metrics.DEFAULT_BYPASS_MAX_SECONDS))
60
61 # Test page for "Chrome-Proxy: block=3600".
62 self.AddPage(ExplicitBypassPage(
63 url=measurements.GetResponseOverrideURL(
64 respHeader='{"Chrome-Proxy":["block=3600"],'
65 '"Via":["1.1 Chrome-Compression-Proxy"]}'),
66 page_set=self,
67 num_bypassed_proxies=2,
68 bypass_seconds_low=3600,
69 bypass_seconds_high=3600))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698