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.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): |
(...skipping 17 matching lines...) Expand all Loading... |
28 with action_runner.CreateGestureInteraction('ScrollAction'): | 28 with action_runner.CreateGestureInteraction('ScrollAction'): |
29 action_runner.ScrollPage(direction='down', speed_in_pixels_per_second=300) | 29 action_runner.ScrollPage(direction='down', speed_in_pixels_per_second=300) |
30 | 30 |
31 class ToughCompositorWaitPage(ToughCompositorPage): | 31 class ToughCompositorWaitPage(ToughCompositorPage): |
32 | 32 |
33 def __init__(self, url, page_set): | 33 def __init__(self, url, page_set): |
34 super(ToughCompositorWaitPage, self).__init__(url=url, page_set=page_set) | 34 super(ToughCompositorWaitPage, self).__init__(url=url, page_set=page_set) |
35 | 35 |
36 def RunPageInteractions(self, action_runner): | 36 def RunPageInteractions(self, action_runner): |
37 # We scroll back and forth a few times to reduce noise in the tests. | 37 # We scroll back and forth a few times to reduce noise in the tests. |
38 with action_runner.CreateInteraction('Animation'): | 38 action_runner.Wait(8) |
39 action_runner.Wait(8) | |
40 | 39 |
41 | 40 |
42 class ToughCompositorCasesPageSet(page_set_module.PageSet): | 41 class ToughCompositorCasesPageSet(page_set_module.PageSet): |
43 | 42 |
44 """ Touch compositor sites """ | 43 """ Touch compositor sites """ |
45 | 44 |
46 def __init__(self): | 45 def __init__(self): |
47 super(ToughCompositorCasesPageSet, self).__init__( | 46 super(ToughCompositorCasesPageSet, self).__init__( |
48 user_agent_type='mobile', | 47 user_agent_type='mobile', |
49 archive_data_file='data/tough_compositor_cases.json', | 48 archive_data_file='data/tough_compositor_cases.json', |
(...skipping 19 matching lines...) Expand all Loading... |
69 'http://jsbin.com/beqojupo/1/quiet?JS_FULL_SCREEN_INVALIDATION', | 68 'http://jsbin.com/beqojupo/1/quiet?JS_FULL_SCREEN_INVALIDATION', |
70 # Why: Creates a large number of new tilings """ | 69 # Why: Creates a large number of new tilings """ |
71 'http://jsbin.com/covoqi/1/quiet?NEW_TILINGS', | 70 'http://jsbin.com/covoqi/1/quiet?NEW_TILINGS', |
72 ] | 71 ] |
73 | 72 |
74 for url in scroll_urls_list: | 73 for url in scroll_urls_list: |
75 self.AddUserStory(ToughCompositorScrollPage(url, self)) | 74 self.AddUserStory(ToughCompositorScrollPage(url, self)) |
76 | 75 |
77 for url in wait_urls_list: | 76 for url in wait_urls_list: |
78 self.AddUserStory(ToughCompositorWaitPage(url, self)) | 77 self.AddUserStory(ToughCompositorWaitPage(url, self)) |
OLD | NEW |