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

Side by Side Diff: tools/perf/page_sets/typical_25.py

Issue 808893002: [Telemetry] Remove session_restore's use of PageTest.CanRunForPage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Drop session_restore's use of CanRunForPage. Created 5 years, 11 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 from telemetry.page import page as page_module 4 from telemetry.page import page as page_module
5 from telemetry.page import page_set as page_set_module 5 from telemetry.page import page_set as page_set_module
6 6
7 7
8 # Share the following constants with SessionRestorePageSet.
9 USER_AGENT_TYPE = 'desktop'
10 ARCHIVE_DATA_FILE = 'data/typical_25.json'
11 PAGE_SET_BUCKET = page_set_module.PARTNER_BUCKET
12
13
8 class Typical25Page(page_module.Page): 14 class Typical25Page(page_module.Page):
9 15
10 def __init__(self, url, page_set): 16 def __init__(self, url, page_set):
11 super(Typical25Page, self).__init__(url=url, page_set=page_set) 17 super(Typical25Page, self).__init__(url=url, page_set=page_set)
12 self.user_agent_type = 'desktop' 18 self.user_agent_type = USER_AGENT_TYPE
13 self.archive_data_file = 'data/typical_25.json' 19 self.archive_data_file = ARCHIVE_DATA_FILE
14 20
15 def RunPageInteractions(self, action_runner): 21 def RunPageInteractions(self, action_runner):
16 interaction = action_runner.BeginGestureInteraction( 22 interaction = action_runner.BeginGestureInteraction(
17 'ScrollAction', is_smooth=True) 23 'ScrollAction', is_smooth=True)
18 action_runner.ScrollPage() 24 action_runner.ScrollPage()
19 interaction.End() 25 interaction.End()
20 26
21 27
22 class Typical25PageSet(page_set_module.PageSet): 28 class Typical25PageSet(page_set_module.PageSet):
23 29
24 """ Pages designed to represent the median, not highly optimized web """ 30 """ Pages designed to represent the median, not highly optimized web """
25 31
26 def __init__(self): 32 def __init__(self):
27 super(Typical25PageSet, self).__init__( 33 super(Typical25PageSet, self).__init__(
28 user_agent_type='desktop', 34 user_agent_type=USER_AGENT_TYPE,
29 archive_data_file='data/typical_25.json', 35 archive_data_file=ARCHIVE_DATA_FILE,
30 bucket=page_set_module.PARTNER_BUCKET) 36 bucket=PAGE_SET_BUCKET)
31 37
32 urls_list = [ 38 urls_list = [
33 # Why: Alexa games #48 39 # Why: Alexa games #48
34 'http://www.nick.com/games', 40 'http://www.nick.com/games',
35 # Why: Alexa sports #45 41 # Why: Alexa sports #45
36 'http://www.rei.com/', 42 'http://www.rei.com/',
37 # Why: Alexa sports #50 43 # Why: Alexa sports #50
38 'http://www.fifa.com/', 44 'http://www.fifa.com/',
39 # Why: Alexa shopping #41 45 # Why: Alexa shopping #41
40 'http://www.gamestop.com/ps3', 46 'http://www.gamestop.com/ps3',
(...skipping 24 matching lines...) Expand all
65 # pylint: disable=C0301 71 # pylint: disable=C0301
66 'http://www.theverge.com/2013/3/5/4061684/inside-ted-the-smartest-bubble-i n-the-world', 72 'http://www.theverge.com/2013/3/5/4061684/inside-ted-the-smartest-bubble-i n-the-world',
67 'http://www.airbnb.com/', 73 'http://www.airbnb.com/',
68 'http://www.ign.com/', 74 'http://www.ign.com/',
69 # Why: Alexa health #25 75 # Why: Alexa health #25
70 'http://www.fda.gov', 76 'http://www.fda.gov',
71 ] 77 ]
72 78
73 for url in urls_list: 79 for url in urls_list:
74 self.AddUserStory(Typical25Page(url, self)) 80 self.AddUserStory(Typical25Page(url, self))
OLDNEW
« tools/perf/benchmarks/session_restore.py ('K') | « tools/perf/page_sets/session_restore.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698