| 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 # pylint: disable=W0401,W0614 | 4 # pylint: disable=W0401,W0614 |
| 5 from telemetry.page.actions.all_page_actions import * | 5 from telemetry.page.actions.all_page_actions import * |
| 6 from telemetry.page import page as page_module | 6 from telemetry.page import page as page_module |
| 7 from telemetry.page import page_set as page_set_module | 7 from telemetry.page import page_set as page_set_module |
| 8 | 8 |
| 9 | 9 |
| 10 class ToughCompositorPage(page_module.Page): | 10 class ToughCompositorPage(page_module.Page): |
| 11 | 11 |
| 12 def __init__(self, url, page_set): | 12 def __init__(self, url, page_set): |
| 13 super(ToughCompositorPage, self).__init__(url=url, page_set=page_set) | 13 super(ToughCompositorPage, self).__init__(url=url, page_set=page_set) |
| 14 self.credentials_path = 'data/credentials.json' | 14 self.credentials_path = 'data/credentials.json' |
| 15 self.user_agent_type = 'mobile' | 15 self.user_agent_type = 'mobile' |
| 16 self.archive_data_file = 'data/tough_compositor_cases.json' | 16 self.archive_data_file = 'data/tough_compositor_cases.json' |
| 17 | 17 |
| 18 def RunNavigateSteps(self, action_runner): | 18 def RunNavigateSteps(self, action_runner): |
| 19 action_runner.RunAction(NavigateAction()) | 19 action_runner.NavigateToPage(self) |
| 20 # TODO(epenner): Remove this wait (http://crbug.com/366933) | 20 # TODO(epenner): Remove this wait (http://crbug.com/366933) |
| 21 action_runner.RunAction(WaitAction({'seconds': 5})) | 21 action_runner.RunAction(WaitAction({'seconds': 5})) |
| 22 | 22 |
| 23 class ToughCompositorScrollPage(ToughCompositorPage): | 23 class ToughCompositorScrollPage(ToughCompositorPage): |
| 24 | 24 |
| 25 def __init__(self, url, page_set): | 25 def __init__(self, url, page_set): |
| 26 super(ToughCompositorScrollPage, self).__init__(url=url, page_set=page_set) | 26 super(ToughCompositorScrollPage, self).__init__(url=url, page_set=page_set) |
| 27 | 27 |
| 28 def RunSmoothness(self, action_runner): | 28 def RunSmoothness(self, action_runner): |
| 29 # Make the scroll longer to reduce noise. | 29 # Make the scroll longer to reduce noise. |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 'http://jsbin.com/giqafofe/1/quiet?JS_POSTER_CIRCLE', | 70 'http://jsbin.com/giqafofe/1/quiet?JS_POSTER_CIRCLE', |
| 71 # Why: JS invalidation does lots of uploads """ | 71 # Why: JS invalidation does lots of uploads """ |
| 72 'http://jsbin.com/beqojupo/1/quiet?JS_FULL_SCREEN_INVALIDATION', | 72 'http://jsbin.com/beqojupo/1/quiet?JS_FULL_SCREEN_INVALIDATION', |
| 73 ] | 73 ] |
| 74 | 74 |
| 75 for url in scroll_urls_list: | 75 for url in scroll_urls_list: |
| 76 self.AddPage(ToughCompositorScrollPage(url, self)) | 76 self.AddPage(ToughCompositorScrollPage(url, self)) |
| 77 | 77 |
| 78 for url in wait_urls_list: | 78 for url in wait_urls_list: |
| 79 self.AddPage(ToughCompositorWaitPage(url, self)) | 79 self.AddPage(ToughCompositorWaitPage(url, self)) |
| OLD | NEW |