| 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 |
| 4 from telemetry.page import page as page_module | 5 from telemetry.page import page as page_module |
| 5 from telemetry.page import page_set as page_set_module | |
| 6 | 6 |
| 7 | 7 |
| 8 class ToughAnimationCasesPage(page_module.Page): | 8 class ToughAnimationCasesPage(page_module.Page): |
| 9 | 9 |
| 10 def __init__(self, url, page_set, need_measurement_ready): | 10 def __init__(self, url, page_set, need_measurement_ready): |
| 11 super(ToughAnimationCasesPage, self).__init__(url=url, page_set=page_set) | 11 super(ToughAnimationCasesPage, self).__init__(url=url, page_set=page_set) |
| 12 self.archive_data_file = 'data/tough_animation_cases.json' | 12 self.archive_data_file = 'data/tough_animation_cases.json' |
| 13 self._need_measurement_ready = need_measurement_ready | 13 self._need_measurement_ready = need_measurement_ready |
| 14 | 14 |
| 15 def RunNavigateSteps(self, action_runner): | 15 def RunNavigateSteps(self, action_runner): |
| 16 super(ToughAnimationCasesPage, self).RunNavigateSteps(action_runner) | 16 super(ToughAnimationCasesPage, self).RunNavigateSteps(action_runner) |
| 17 if self._need_measurement_ready: | 17 if self._need_measurement_ready: |
| 18 action_runner.WaitForJavaScriptCondition('window.measurementReady') | 18 action_runner.WaitForJavaScriptCondition('window.measurementReady') |
| 19 | 19 |
| 20 def RunPageInteractions(self, action_runner): | 20 def RunPageInteractions(self, action_runner): |
| 21 with action_runner.CreateInteraction('ToughAnimation'): | 21 with action_runner.CreateInteraction('ToughAnimation'): |
| 22 action_runner.Wait(10) | 22 action_runner.Wait(10) |
| 23 | 23 |
| 24 class ToughAnimationCasesPageSet(page_set_module.PageSet): | 24 class ToughAnimationCasesPageSet(story.StorySet): |
| 25 | 25 |
| 26 """ | 26 """ |
| 27 Description: A collection of animation performance tests | 27 Description: A collection of animation performance tests |
| 28 """ | 28 """ |
| 29 | 29 |
| 30 def __init__(self): | 30 def __init__(self): |
| 31 super(ToughAnimationCasesPageSet, self).__init__( | 31 super(ToughAnimationCasesPageSet, self).__init__( |
| 32 archive_data_file='data/tough_animation_cases.json', | 32 archive_data_file='data/tough_animation_cases.json', |
| 33 bucket=page_set_module.PARTNER_BUCKET) | 33 cloud_storage_bucket=story.PARTNER_BUCKET) |
| 34 | 34 |
| 35 urls_list_one = [ | 35 urls_list_one = [ |
| 36 # Why: Tests the balls animation implemented with SVG animations. | 36 # Why: Tests the balls animation implemented with SVG animations. |
| 37 'file://tough_animation_cases/balls_svg_animations.html', | 37 'file://tough_animation_cases/balls_svg_animations.html', |
| 38 # Why: Tests the balls animation implemented with Javascript and canvas. | 38 # Why: Tests the balls animation implemented with Javascript and canvas. |
| 39 'file://tough_animation_cases/balls_javascript_canvas.html', | 39 'file://tough_animation_cases/balls_javascript_canvas.html', |
| 40 # Why: Tests the balls animation implemented with Javascript and CSS. | 40 # Why: Tests the balls animation implemented with Javascript and CSS. |
| 41 'file://tough_animation_cases/balls_javascript_css.html', | 41 'file://tough_animation_cases/balls_javascript_css.html', |
| 42 # Why: Tests the balls animation implemented with CSS keyframe animations. | 42 # Why: Tests the balls animation implemented with CSS keyframe animations. |
| 43 'file://tough_animation_cases/balls_css_keyframe_animations.html', | 43 'file://tough_animation_cases/balls_css_keyframe_animations.html', |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 'file://tough_animation_cases/mix_blend_mode_propagating_isolation.html', | 255 'file://tough_animation_cases/mix_blend_mode_propagating_isolation.html', |
| 256 | 256 |
| 257 # Disabled: crbug.com/350692 | 257 # Disabled: crbug.com/350692 |
| 258 # Why: Login page is slow because of ineffecient transform operations. | 258 # Why: Login page is slow because of ineffecient transform operations. |
| 259 # 'http://ie.microsoft.com/testdrive/performance/robohornetpro/', | 259 # 'http://ie.microsoft.com/testdrive/performance/robohornetpro/', |
| 260 ] | 260 ] |
| 261 | 261 |
| 262 for url in urls_list_two: | 262 for url in urls_list_two: |
| 263 self.AddUserStory(ToughAnimationCasesPage(url, self, | 263 self.AddUserStory(ToughAnimationCasesPage(url, self, |
| 264 need_measurement_ready=False)) | 264 need_measurement_ready=False)) |
| OLD | NEW |