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

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

Issue 1198823004: Update perf page_set to use story_set (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 page_sets import key_mobile_sites_pages
5 from telemetry import story
6 from telemetry.page import page as page_module
4 from telemetry.page import shared_page_state 7 from telemetry.page import shared_page_state
5 from telemetry.page import page as page_module
6 from telemetry.page import page_set as page_set_module
7
8 from page_sets import key_mobile_sites_pages
9 8
10 9
11 def _IssueMarkerAndScroll(action_runner): 10 def _IssueMarkerAndScroll(action_runner):
12 with action_runner.CreateGestureInteraction('ScrollAction'): 11 with action_runner.CreateGestureInteraction('ScrollAction'):
13 action_runner.ScrollPage() 12 action_runner.ScrollPage()
14 13
15 14
16 def _CreatePageClassWithSmoothInteractions(page_cls): 15 def _CreatePageClassWithSmoothInteractions(page_cls):
17 class DerivedSmoothPage(page_cls): # pylint: disable=W0232 16 class DerivedSmoothPage(page_cls): # pylint: disable=W0232
18 17
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 class AmazonNicolasCageSmoothPage( 120 class AmazonNicolasCageSmoothPage(
122 key_mobile_sites_pages.AmazonNicolasCagePage): 121 key_mobile_sites_pages.AmazonNicolasCagePage):
123 122
124 def RunPageInteractions(self, action_runner): 123 def RunPageInteractions(self, action_runner):
125 with action_runner.CreateGestureInteraction('ScrollAction'): 124 with action_runner.CreateGestureInteraction('ScrollAction'):
126 action_runner.ScrollElement( 125 action_runner.ScrollElement(
127 selector='#search', 126 selector='#search',
128 distance_expr='document.body.scrollHeight - window.innerHeight') 127 distance_expr='document.body.scrollHeight - window.innerHeight')
129 128
130 129
131 class KeyMobileSitesSmoothPageSet(page_set_module.PageSet): 130 class KeyMobileSitesSmoothPageSet(story.StorySet):
132 131
133 """ Key mobile sites with smooth interactions. """ 132 """ Key mobile sites with smooth interactions. """
134 133
135 def __init__(self): 134 def __init__(self):
136 super(KeyMobileSitesSmoothPageSet, self).__init__( 135 super(KeyMobileSitesSmoothPageSet, self).__init__(
137 archive_data_file='data/key_mobile_sites_smooth.json', 136 archive_data_file='data/key_mobile_sites_smooth.json',
138 bucket=page_set_module.PARTNER_BUCKET) 137 cloud_storage_bucket=story.PARTNER_BUCKET)
139 138
140 139
141 # Add pages with predefined classes that contain custom navigation logic. 140 # Add pages with predefined classes that contain custom navigation logic.
142 predefined_page_classes = [ 141 predefined_page_classes = [
143 key_mobile_sites_pages.CapitolVolkswagenPage, 142 key_mobile_sites_pages.CapitolVolkswagenPage,
144 key_mobile_sites_pages.TheVergeArticlePage, 143 key_mobile_sites_pages.TheVergeArticlePage,
145 key_mobile_sites_pages.CnnArticlePage, 144 key_mobile_sites_pages.CnnArticlePage,
146 key_mobile_sites_pages.FacebookPage, 145 key_mobile_sites_pages.FacebookPage,
147 key_mobile_sites_pages.YoutubeMobilePage, 146 key_mobile_sites_pages.YoutubeMobilePage,
148 key_mobile_sites_pages.YahooAnswersPage, 147 key_mobile_sites_pages.YahooAnswersPage,
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 ('http://www.baidu.com/s?wd=barack+obama&rsv_bp=0&rsv_spt=3&rsv_sug3=9&' 277 ('http://www.baidu.com/s?wd=barack+obama&rsv_bp=0&rsv_spt=3&rsv_sug3=9&'
279 'rsv_sug=0&rsv_sug4=3824&rsv_sug1=3&inputT=4920'), 278 'rsv_sug=0&rsv_sug4=3824&rsv_sug1=3&inputT=4920'),
280 # Why: Top search engine 279 # Why: Top search engine
281 'http://www.bing.com/search?q=sloths', 280 'http://www.bing.com/search?q=sloths',
282 # Why: Good example of poor initial scrolling 281 # Why: Good example of poor initial scrolling
283 'http://ftw.usatoday.com/2014/05/spelling-bee-rules-shenanigans' 282 'http://ftw.usatoday.com/2014/05/spelling-bee-rules-shenanigans'
284 ] 283 ]
285 284
286 for url in urls_list: 285 for url in urls_list:
287 self.AddUserStory(KeyMobileSitesSmoothPage(url, self)) 286 self.AddUserStory(KeyMobileSitesSmoothPage(url, self))
OLDNEW
« no previous file with comments | « tools/perf/page_sets/key_mobile_sites_repaint.py ('k') | tools/perf/page_sets/key_search_mobile.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698