Index: tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/explicit_bypass.py |
diff --git a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/explicit_bypass.py b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/explicit_bypass.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..abcd3696a848c73c20c4bbe175ee155ffa0e489c |
--- /dev/null |
+++ b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/explicit_bypass.py |
@@ -0,0 +1,69 @@ |
+# Copyright 2014 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+from integration_tests import chrome_proxy_measurements as measurements |
+from integration_tests import chrome_proxy_metrics as metrics |
+from telemetry.page import page as page_module |
+from telemetry.page import page_set as page_set_module |
+ |
+ |
+class ExplicitBypassPage(page_module.Page): |
+ |
bengr
2014/10/17 23:24:07
comment?
sclittle
2014/10/17 23:42:33
Done.
|
+ def __init__(self, |
+ url, |
+ page_set, |
+ num_bypassed_proxies, |
+ bypass_seconds_low, |
+ bypass_seconds_high): |
+ super(ExplicitBypassPage, self).__init__(url=url, page_set=page_set) |
+ self.num_bypassed_proxies = num_bypassed_proxies |
+ self.bypass_seconds_low = bypass_seconds_low |
+ self.bypass_seconds_high = bypass_seconds_high |
+ |
+ |
+class ExplicitBypassPageSet(page_set_module.PageSet): |
+ """ Chrome proxy test sites """ |
+ |
+ def __init__(self): |
+ super(ExplicitBypassPageSet, self).__init__() |
+ |
+ # Test page for "Chrome-Proxy: bypass=0". |
+ self.AddPage(ExplicitBypassPage( |
+ url=measurements.GetResponseOverrideURL( |
+ respHeader='{"Chrome-Proxy":["bypass=0"],' |
+ '"Via":["1.1 Chrome-Compression-Proxy"]}'), |
+ page_set=self, |
+ num_bypassed_proxies=1, |
+ bypass_seconds_low=metrics.DEFAULT_BYPASS_MIN_SECONDS, |
+ bypass_seconds_high=metrics.DEFAULT_BYPASS_MAX_SECONDS)) |
+ |
+ # Test page for "Chrome-Proxy: bypass=3600". |
+ self.AddPage(ExplicitBypassPage( |
+ url=measurements.GetResponseOverrideURL( |
+ respHeader='{"Chrome-Proxy":["bypass=3600"],' |
+ '"Via":["1.1 Chrome-Compression-Proxy"]}'), |
+ page_set=self, |
+ num_bypassed_proxies=1, |
+ bypass_seconds_low=3600, |
+ bypass_seconds_high=3600)) |
+ |
+ # Test page for "Chrome-Proxy: block=0". |
+ self.AddPage(ExplicitBypassPage( |
+ url=measurements.GetResponseOverrideURL( |
+ respHeader='{"Chrome-Proxy":["block=0"],' |
+ '"Via":["1.1 Chrome-Compression-Proxy"]}'), |
+ page_set=self, |
+ num_bypassed_proxies=2, |
+ bypass_seconds_low=metrics.DEFAULT_BYPASS_MIN_SECONDS, |
+ bypass_seconds_high=metrics.DEFAULT_BYPASS_MAX_SECONDS)) |
+ |
+ # Test page for "Chrome-Proxy: block=3600". |
+ self.AddPage(ExplicitBypassPage( |
+ url=measurements.GetResponseOverrideURL( |
+ respHeader='{"Chrome-Proxy":["block=3600"],' |
+ '"Via":["1.1 Chrome-Compression-Proxy"]}'), |
+ page_set=self, |
+ num_bypassed_proxies=2, |
+ bypass_seconds_low=3600, |
+ bypass_seconds_high=3600)) |