OLD | NEW |
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 import story |
| 5 from telemetry.page import page as page_module |
4 from telemetry.page import shared_page_state | 6 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 | 7 |
8 | 8 |
9 class ToughCompositorPage(page_module.Page): | 9 class ToughCompositorPage(page_module.Page): |
10 | 10 |
11 def __init__(self, url, page_set): | 11 def __init__(self, url, page_set): |
12 super(ToughCompositorPage, self).__init__( | 12 super(ToughCompositorPage, self).__init__( |
13 url=url, page_set=page_set, credentials_path = 'data/credentials.json', | 13 url=url, page_set=page_set, credentials_path = 'data/credentials.json', |
14 shared_page_state_class=shared_page_state.SharedMobilePageState) | 14 shared_page_state_class=shared_page_state.SharedMobilePageState) |
15 self.archive_data_file = 'data/tough_compositor_cases.json' | 15 self.archive_data_file = 'data/tough_compositor_cases.json' |
16 | 16 |
(...skipping 16 matching lines...) Expand all Loading... |
33 | 33 |
34 def __init__(self, url, page_set): | 34 def __init__(self, url, page_set): |
35 super(ToughCompositorWaitPage, self).__init__(url=url, page_set=page_set) | 35 super(ToughCompositorWaitPage, self).__init__(url=url, page_set=page_set) |
36 | 36 |
37 def RunPageInteractions(self, action_runner): | 37 def RunPageInteractions(self, action_runner): |
38 # We scroll back and forth a few times to reduce noise in the tests. | 38 # We scroll back and forth a few times to reduce noise in the tests. |
39 with action_runner.CreateInteraction('Animation'): | 39 with action_runner.CreateInteraction('Animation'): |
40 action_runner.Wait(8) | 40 action_runner.Wait(8) |
41 | 41 |
42 | 42 |
43 class ToughCompositorCasesPageSet(page_set_module.PageSet): | 43 class ToughCompositorCasesPageSet(story.StorySet): |
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__( |
49 archive_data_file='data/tough_compositor_cases.json', | 49 archive_data_file='data/tough_compositor_cases.json', |
50 bucket=page_set_module.PUBLIC_BUCKET) | 50 cloud_storage_bucket=story.PUBLIC_BUCKET) |
51 | 51 |
52 scroll_urls_list = [ | 52 scroll_urls_list = [ |
53 # Why: Baseline CC scrolling page. A long page with only text. """ | 53 # Why: Baseline CC scrolling page. A long page with only text. """ |
54 'http://jsbin.com/pixavefe/1/quiet?CC_SCROLL_TEXT_ONLY', | 54 'http://jsbin.com/pixavefe/1/quiet?CC_SCROLL_TEXT_ONLY', |
55 # Why: Baseline JS scrolling page. A long page with only text. """ | 55 # Why: Baseline JS scrolling page. A long page with only text. """ |
56 'http://jsbin.com/wixadinu/2/quiet?JS_SCROLL_TEXT_ONLY', | 56 'http://jsbin.com/wixadinu/2/quiet?JS_SCROLL_TEXT_ONLY', |
57 # Why: Scroll by a large number of CC layers """ | 57 # Why: Scroll by a large number of CC layers """ |
58 'http://jsbin.com/yakagevo/1/quiet?CC_SCROLL_200_LAYER_GRID', | 58 'http://jsbin.com/yakagevo/1/quiet?CC_SCROLL_200_LAYER_GRID', |
59 # Why: Scroll by a large number of JS layers """ | 59 # Why: Scroll by a large number of JS layers """ |
60 'http://jsbin.com/jevibahi/4/quiet?JS_SCROLL_200_LAYER_GRID', | 60 'http://jsbin.com/jevibahi/4/quiet?JS_SCROLL_200_LAYER_GRID', |
61 ] | 61 ] |
62 | 62 |
63 wait_urls_list = [ | 63 wait_urls_list = [ |
64 # Why: CC Poster circle animates many layers """ | 64 # Why: CC Poster circle animates many layers """ |
65 'http://jsbin.com/falefice/1/quiet?CC_POSTER_CIRCLE', | 65 'http://jsbin.com/falefice/1/quiet?CC_POSTER_CIRCLE', |
66 # Why: JS poster circle animates/commits many layers """ | 66 # Why: JS poster circle animates/commits many layers """ |
67 'http://jsbin.com/giqafofe/1/quiet?JS_POSTER_CIRCLE', | 67 'http://jsbin.com/giqafofe/1/quiet?JS_POSTER_CIRCLE', |
68 # Why: JS invalidation does lots of uploads """ | 68 # Why: JS invalidation does lots of uploads """ |
69 'http://jsbin.com/beqojupo/1/quiet?JS_FULL_SCREEN_INVALIDATION', | 69 'http://jsbin.com/beqojupo/1/quiet?JS_FULL_SCREEN_INVALIDATION', |
70 # Why: Creates a large number of new tilings """ | 70 # Why: Creates a large number of new tilings """ |
71 'http://jsbin.com/covoqi/1/quiet?NEW_TILINGS', | 71 'http://jsbin.com/covoqi/1/quiet?NEW_TILINGS', |
72 ] | 72 ] |
73 | 73 |
74 for url in scroll_urls_list: | 74 for url in scroll_urls_list: |
75 self.AddUserStory(ToughCompositorScrollPage(url, self)) | 75 self.AddUserStory(ToughCompositorScrollPage(url, self)) |
76 | 76 |
77 for url in wait_urls_list: | 77 for url in wait_urls_list: |
78 self.AddUserStory(ToughCompositorWaitPage(url, self)) | 78 self.AddUserStory(ToughCompositorWaitPage(url, self)) |
OLD | NEW |