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

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

Issue 826113003: [Telemetry] Rename RunSmoothness to RunPageInteractions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « tools/perf/page_sets/tough_canvas_cases.py ('k') | tools/perf/page_sets/tough_filters_cases.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 class ToughCompositorPage(page_module.Page): 8 class ToughCompositorPage(page_module.Page):
9 9
10 def __init__(self, url, page_set): 10 def __init__(self, url, page_set):
11 super(ToughCompositorPage, self).__init__( 11 super(ToughCompositorPage, self).__init__(
12 url=url, page_set=page_set, credentials_path = 'data/credentials.json') 12 url=url, page_set=page_set, credentials_path = 'data/credentials.json')
13 self.user_agent_type = 'mobile' 13 self.user_agent_type = 'mobile'
14 self.archive_data_file = 'data/tough_compositor_cases.json' 14 self.archive_data_file = 'data/tough_compositor_cases.json'
15 15
16 def RunNavigateSteps(self, action_runner): 16 def RunNavigateSteps(self, action_runner):
17 action_runner.NavigateToPage(self) 17 action_runner.NavigateToPage(self)
18 # TODO(epenner): Remove this wait (http://crbug.com/366933) 18 # TODO(epenner): Remove this wait (http://crbug.com/366933)
19 action_runner.Wait(5) 19 action_runner.Wait(5)
20 20
21 class ToughCompositorScrollPage(ToughCompositorPage): 21 class ToughCompositorScrollPage(ToughCompositorPage):
22 22
23 def __init__(self, url, page_set): 23 def __init__(self, url, page_set):
24 super(ToughCompositorScrollPage, self).__init__(url=url, page_set=page_set) 24 super(ToughCompositorScrollPage, self).__init__(url=url, page_set=page_set)
25 25
26 def RunSmoothness(self, action_runner): 26 def RunPageInteractions(self, action_runner):
27 # Make the scroll longer to reduce noise. 27 # Make the scroll longer to reduce noise.
28 interaction = action_runner.BeginGestureInteraction( 28 interaction = action_runner.BeginGestureInteraction(
29 'ScrollAction', is_smooth=True) 29 'ScrollAction', is_smooth=True)
30 action_runner.ScrollPage(direction='down', speed_in_pixels_per_second=300) 30 action_runner.ScrollPage(direction='down', speed_in_pixels_per_second=300)
31 interaction.End() 31 interaction.End()
32 32
33 class ToughCompositorWaitPage(ToughCompositorPage): 33 class ToughCompositorWaitPage(ToughCompositorPage):
34 34
35 def __init__(self, url, page_set): 35 def __init__(self, url, page_set):
36 super(ToughCompositorWaitPage, self).__init__(url=url, page_set=page_set) 36 super(ToughCompositorWaitPage, self).__init__(url=url, page_set=page_set)
37 37
38 def RunSmoothness(self, action_runner): 38 def RunPageInteractions(self, action_runner):
39 # We scroll back and forth a few times to reduce noise in the tests. 39 # We scroll back and forth a few times to reduce noise in the tests.
40 action_runner.Wait(8) 40 action_runner.Wait(8)
41 41
42 42
43 class ToughCompositorCasesPageSet(page_set_module.PageSet): 43 class ToughCompositorCasesPageSet(page_set_module.PageSet):
44 44
45 """ Touch compositor sites """ 45 """ Touch compositor sites """
46 46
47 def __init__(self): 47 def __init__(self):
48 super(ToughCompositorCasesPageSet, self).__init__( 48 super(ToughCompositorCasesPageSet, self).__init__(
(...skipping 21 matching lines...) Expand all
70 'http://jsbin.com/beqojupo/1/quiet?JS_FULL_SCREEN_INVALIDATION', 70 'http://jsbin.com/beqojupo/1/quiet?JS_FULL_SCREEN_INVALIDATION',
71 # Why: Creates a large number of new tilings """ 71 # Why: Creates a large number of new tilings """
72 'http://jsbin.com/covoqi/1/quiet?NEW_TILINGS', 72 'http://jsbin.com/covoqi/1/quiet?NEW_TILINGS',
73 ] 73 ]
74 74
75 for url in scroll_urls_list: 75 for url in scroll_urls_list:
76 self.AddUserStory(ToughCompositorScrollPage(url, self)) 76 self.AddUserStory(ToughCompositorScrollPage(url, self))
77 77
78 for url in wait_urls_list: 78 for url in wait_urls_list:
79 self.AddUserStory(ToughCompositorWaitPage(url, self)) 79 self.AddUserStory(ToughCompositorWaitPage(url, self))
OLDNEW
« no previous file with comments | « tools/perf/page_sets/tough_canvas_cases.py ('k') | tools/perf/page_sets/tough_filters_cases.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698