| 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 action_runner.Wait(8) | 38 with action_runner.CreateInteraction('Animation'): |
| 39 action_runner.Wait(8) |
| 39 | 40 |
| 40 | 41 |
| 41 class ToughCompositorCasesPageSet(page_set_module.PageSet): | 42 class ToughCompositorCasesPageSet(page_set_module.PageSet): |
| 42 | 43 |
| 43 """ Touch compositor sites """ | 44 """ Touch compositor sites """ |
| 44 | 45 |
| 45 def __init__(self): | 46 def __init__(self): |
| 46 super(ToughCompositorCasesPageSet, self).__init__( | 47 super(ToughCompositorCasesPageSet, self).__init__( |
| 47 user_agent_type='mobile', | 48 user_agent_type='mobile', |
| 48 archive_data_file='data/tough_compositor_cases.json', | 49 archive_data_file='data/tough_compositor_cases.json', |
| (...skipping 19 matching lines...) Expand all Loading... |
| 68 'http://jsbin.com/beqojupo/1/quiet?JS_FULL_SCREEN_INVALIDATION', | 69 'http://jsbin.com/beqojupo/1/quiet?JS_FULL_SCREEN_INVALIDATION', |
| 69 # Why: Creates a large number of new tilings """ | 70 # Why: Creates a large number of new tilings """ |
| 70 'http://jsbin.com/covoqi/1/quiet?NEW_TILINGS', | 71 'http://jsbin.com/covoqi/1/quiet?NEW_TILINGS', |
| 71 ] | 72 ] |
| 72 | 73 |
| 73 for url in scroll_urls_list: | 74 for url in scroll_urls_list: |
| 74 self.AddUserStory(ToughCompositorScrollPage(url, self)) | 75 self.AddUserStory(ToughCompositorScrollPage(url, self)) |
| 75 | 76 |
| 76 for url in wait_urls_list: | 77 for url in wait_urls_list: |
| 77 self.AddUserStory(ToughCompositorWaitPage(url, self)) | 78 self.AddUserStory(ToughCompositorWaitPage(url, self)) |
| OLD | NEW |