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

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

Issue 2926633002: Explicitly setting story names for all smoothness benchmarks (Closed)
Patch Set: Explicitly setting story names for all smoothness benchmarks Created 3 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 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 8
9 class ToughPinchZoomCasesPage(page_module.Page): 9 class ToughPinchZoomCasesPage(page_module.Page):
10 10
11 def __init__(self, url, page_set, name=''): 11 def __init__(self, url, page_set, name=''):
12 if name == '':
13 name = url
12 super(ToughPinchZoomCasesPage, self).__init__( 14 super(ToughPinchZoomCasesPage, self).__init__(
13 url=url, page_set=page_set, name=name, 15 url=url, page_set=page_set, name=name,
14 shared_page_state_class=shared_page_state.SharedDesktopPageState, 16 shared_page_state_class=shared_page_state.SharedDesktopPageState,
15 credentials_path = 'data/credentials.json') 17 credentials_path = 'data/credentials.json')
16 self.target_scale_factor = page_set.target_scale_factor 18 self.target_scale_factor = page_set.target_scale_factor
17 19
18 def RunPinchGesture(self, action_runner, left_anchor_ratio=0.5, 20 def RunPinchGesture(self, action_runner, left_anchor_ratio=0.5,
19 top_anchor_ratio=0.5, scale_factor=None, 21 top_anchor_ratio=0.5, scale_factor=None,
20 speed_in_pixels_per_second=800): 22 speed_in_pixels_per_second=800):
21 with action_runner.CreateGestureInteraction('PinchAction', 23 with action_runner.CreateGestureInteraction('PinchAction',
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 action_runner.Wait(2) 211 action_runner.Wait(2)
210 212
211 213
212 class ToughPinchZoomCasesPageSet(story.StorySet): 214 class ToughPinchZoomCasesPageSet(story.StorySet):
213 215
214 """ Set of pages that are tricky to pinch-zoom """ 216 """ Set of pages that are tricky to pinch-zoom """
215 217
216 def __init__(self, target_scale_factor): 218 def __init__(self, target_scale_factor):
217 super(ToughPinchZoomCasesPageSet, self).__init__( 219 super(ToughPinchZoomCasesPageSet, self).__init__(
218 archive_data_file='data/tough_pinch_zoom_cases.json', 220 archive_data_file='data/tough_pinch_zoom_cases.json',
219 cloud_storage_bucket=story.PARTNER_BUCKET) 221 cloud_storage_bucket=story.PARTNER_BUCKET,
222 verify_names=True)
220 223
221 self.target_scale_factor = target_scale_factor 224 self.target_scale_factor = target_scale_factor
222 225
223 self.AddStory(GoogleSearchPage(self)) 226 self.AddStory(GoogleSearchPage(self))
224 self.AddStory(GmailPage(self)) 227 self.AddStory(GmailPage(self))
225 self.AddStory(GoogleCalendarPage(self)) 228 self.AddStory(GoogleCalendarPage(self))
226 self.AddStory(GoogleImageSearchPage(self)) 229 self.AddStory(GoogleImageSearchPage(self))
227 self.AddStory(YoutubePage(self)) 230 self.AddStory(YoutubePage(self))
228 self.AddStory(BlogSpotPage(self)) 231 self.AddStory(BlogSpotPage(self))
229 self.AddStory(FacebookPage(self)) 232 self.AddStory(FacebookPage(self))
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 def __init__(self): 272 def __init__(self):
270 super(AndroidToughPinchZoomCasesPageSet, self).__init__(7.0) 273 super(AndroidToughPinchZoomCasesPageSet, self).__init__(7.0)
271 274
272 275
273 class DesktopToughPinchZoomCasesPageSet(ToughPinchZoomCasesPageSet): 276 class DesktopToughPinchZoomCasesPageSet(ToughPinchZoomCasesPageSet):
274 277
275 """ ToughPinchZoomCasesPageSet using the maximum desktop zoom level """ 278 """ ToughPinchZoomCasesPageSet using the maximum desktop zoom level """
276 279
277 def __init__(self): 280 def __init__(self):
278 super(DesktopToughPinchZoomCasesPageSet, self).__init__(4.0) 281 super(DesktopToughPinchZoomCasesPageSet, self).__init__(4.0)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698