[Session restore] Rename group name Enabled to Restore.
[chromium-blink-merge.git] / tools / perf / page_sets / tough_compositor_cases.py
blobcbf585da4d3ef45289f66302c5042749b51769f2
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
3 # found in the LICENSE file.
4 from telemetry.page import page as page_module
5 from telemetry.page import page_set as page_set_module
8 class ToughCompositorPage(page_module.Page):
10 def __init__(self, url, page_set):
11 super(ToughCompositorPage, self).__init__(
12 url=url, page_set=page_set, credentials_path = 'data/credentials.json')
13 self.user_agent_type = 'mobile'
14 self.archive_data_file = 'data/tough_compositor_cases.json'
16 def RunNavigateSteps(self, action_runner):
17 super(ToughCompositorPage, self).RunNavigateSteps(action_runner)
18 # TODO(epenner): Remove this wait (http://crbug.com/366933)
19 action_runner.Wait(5)
21 class ToughCompositorScrollPage(ToughCompositorPage):
23 def __init__(self, url, page_set):
24 super(ToughCompositorScrollPage, self).__init__(url=url, page_set=page_set)
26 def RunPageInteractions(self, action_runner):
27 # Make the scroll longer to reduce noise.
28 interaction = action_runner.BeginGestureInteraction(
29 'ScrollAction')
30 action_runner.ScrollPage(direction='down', speed_in_pixels_per_second=300)
31 interaction.End()
33 class ToughCompositorWaitPage(ToughCompositorPage):
35 def __init__(self, url, page_set):
36 super(ToughCompositorWaitPage, self).__init__(url=url, page_set=page_set)
38 def RunPageInteractions(self, action_runner):
39 # We scroll back and forth a few times to reduce noise in the tests.
40 action_runner.Wait(8)
43 class ToughCompositorCasesPageSet(page_set_module.PageSet):
45 """ Touch compositor sites """
47 def __init__(self):
48 super(ToughCompositorCasesPageSet, self).__init__(
49 user_agent_type='mobile',
50 archive_data_file='data/tough_compositor_cases.json',
51 bucket=page_set_module.PUBLIC_BUCKET)
53 scroll_urls_list = [
54 # Why: Baseline CC scrolling page. A long page with only text. """
55 'http://jsbin.com/pixavefe/1/quiet?CC_SCROLL_TEXT_ONLY',
56 # Why: Baseline JS scrolling page. A long page with only text. """
57 'http://jsbin.com/wixadinu/2/quiet?JS_SCROLL_TEXT_ONLY',
58 # Why: Scroll by a large number of CC layers """
59 'http://jsbin.com/yakagevo/1/quiet?CC_SCROLL_200_LAYER_GRID',
60 # Why: Scroll by a large number of JS layers """
61 'http://jsbin.com/jevibahi/4/quiet?JS_SCROLL_200_LAYER_GRID',
64 wait_urls_list = [
65 # Why: CC Poster circle animates many layers """
66 'http://jsbin.com/falefice/1/quiet?CC_POSTER_CIRCLE',
67 # Why: JS poster circle animates/commits many layers """
68 'http://jsbin.com/giqafofe/1/quiet?JS_POSTER_CIRCLE',
69 # Why: JS invalidation does lots of uploads """
70 'http://jsbin.com/beqojupo/1/quiet?JS_FULL_SCREEN_INVALIDATION',
71 # Why: Creates a large number of new tilings """
72 'http://jsbin.com/covoqi/1/quiet?NEW_TILINGS',
75 for url in scroll_urls_list:
76 self.AddUserStory(ToughCompositorScrollPage(url, self))
78 for url in wait_urls_list:
79 self.AddUserStory(ToughCompositorWaitPage(url, self))