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

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

Issue 1218073014: Migrate from telemetry PageSet -> StorySet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments and rebase Created 5 years, 5 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 from telemetry.page import page as page_module 5 from telemetry.page import page as page_module
6 from telemetry.page import page_set as page_set_module 6 from telemetry import story
7 7
8 8
9 class ReenableAfterBypassPage(page_module.Page): 9 class ReenableAfterBypassPage(page_module.Page):
10 """A test page for the re-enable after bypass tests. 10 """A test page for the re-enable after bypass tests.
11 11
12 Attributes: 12 Attributes:
13 bypass_seconds_min: The minimum number of seconds that the bypass 13 bypass_seconds_min: The minimum number of seconds that the bypass
14 triggered by loading this page should last. 14 triggered by loading this page should last.
15 bypass_seconds_max: The maximum number of seconds that the bypass 15 bypass_seconds_max: The maximum number of seconds that the bypass
16 triggered by loading this page should last. 16 triggered by loading this page should last.
17 """ 17 """
18 18
19 def __init__(self, 19 def __init__(self,
20 url, 20 url,
21 page_set, 21 page_set,
22 bypass_seconds_min, 22 bypass_seconds_min,
23 bypass_seconds_max): 23 bypass_seconds_max):
24 super(ReenableAfterBypassPage, self).__init__(url=url, page_set=page_set) 24 super(ReenableAfterBypassPage, self).__init__(url=url, page_set=page_set)
25 self.bypass_seconds_min = bypass_seconds_min 25 self.bypass_seconds_min = bypass_seconds_min
26 self.bypass_seconds_max = bypass_seconds_max 26 self.bypass_seconds_max = bypass_seconds_max
27 27
28 28
29 class ReenableAfterBypassPageSet(page_set_module.PageSet): 29 class ReenableAfterBypassStorySet(story.StorySet):
30 """ Chrome proxy test sites """ 30 """ Chrome proxy test sites """
31 31
32 def __init__(self): 32 def __init__(self):
33 super(ReenableAfterBypassPageSet, self).__init__() 33 super(ReenableAfterBypassStorySet, self).__init__()
34 34
35 # Test page for "Chrome-Proxy: block=0". Loading this page should cause all 35 # Test page for "Chrome-Proxy: block=0". Loading this page should cause all
36 # data reduction proxies to be bypassed for one to five minutes. 36 # data reduction proxies to be bypassed for one to five minutes.
37 self.AddUserStory(ReenableAfterBypassPage( 37 self.AddStory(ReenableAfterBypassPage(
38 url="http://check.googlezip.net/block", 38 url="http://check.googlezip.net/block",
39 page_set=self, 39 page_set=self,
40 bypass_seconds_min=60, 40 bypass_seconds_min=60,
41 bypass_seconds_max=300)) 41 bypass_seconds_max=300))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698