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

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

Issue 1912443002: Reimplement basic PopularUrls page cycler in telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 shared_page_state 5 from telemetry.page import shared_page_state
6 from telemetry import story 6 from telemetry import story
7 7
8 from page_sets import key_mobile_sites_pages 8 from page_sets import key_mobile_sites_pages
9 9
10 10
11 class KeyMobileSitesPage(page_module.Page): 11 class KeyMobileSitesPage(page_module.Page):
12 12
13 def __init__(self, url, page_set, name='', labels=None, 13 def __init__(self, url, page_set, name='', labels=None,
14 action_on_load_complete=False): 14 action_on_load_complete=False):
15 super(KeyMobileSitesPage, self).__init__( 15 super(KeyMobileSitesPage, self).__init__(
16 url=url, page_set=page_set, name=name, 16 url=url, page_set=page_set, name=name,
17 shared_page_state_class=shared_page_state.SharedMobilePageState, 17 shared_page_state_class=shared_page_state.SharedMobilePageState,
18 credentials_path='data/credentials.json', labels=labels) 18 credentials_path='data/credentials.json', labels=labels)
19 self.archive_data_file = 'data/key_mobile_sites.json'
jbudorick 2016/05/02 17:46:12 ?
20 self.action_on_load_complete = action_on_load_complete 19 self.action_on_load_complete = action_on_load_complete
21 20
22 21
23 class KeyMobileSitesPageSet(story.StorySet): 22 class KeyMobileSitesPageSet(story.StorySet):
24 23
25 """ Key mobile sites with smooth interactions. """ 24 """ Key mobile sites with smooth interactions. """
26 25
27 def __init__(self): 26 def __init__(self):
28 super(KeyMobileSitesPageSet, self).__init__( 27 super(KeyMobileSitesPageSet, self).__init__(
29 archive_data_file='data/key_mobile_sites.json', 28 archive_data_file='data/key_mobile_sites.json',
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 ('http://www.baidu.com/s?wd=barack+obama&rsv_bp=0&rsv_spt=3&rsv_sug3=9&' 166 ('http://www.baidu.com/s?wd=barack+obama&rsv_bp=0&rsv_spt=3&rsv_sug3=9&'
168 'rsv_sug=0&rsv_sug4=3824&rsv_sug1=3&inputT=4920'), 167 'rsv_sug=0&rsv_sug4=3824&rsv_sug1=3&inputT=4920'),
169 # Why: Top search engine 168 # Why: Top search engine
170 'http://www.bing.com/search?q=sloths', 169 'http://www.bing.com/search?q=sloths',
171 # Why: Good example of poor initial scrolling 170 # Why: Good example of poor initial scrolling
172 'http://ftw.usatoday.com/2014/05/spelling-bee-rules-shenanigans' 171 'http://ftw.usatoday.com/2014/05/spelling-bee-rules-shenanigans'
173 ] 172 ]
174 173
175 for url in urls_list: 174 for url in urls_list:
176 self.AddStory(KeyMobileSitesPage(url, self)) 175 self.AddStory(KeyMobileSitesPage(url, self))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698