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 ToughAnimationCasesPage(page_module.Page): | 10 class ToughAnimationCasesPage(page_module.Page): |
11 | 11 |
12 def __init__(self, url, page_set, need_measurement_ready): | 12 def __init__(self, url, page_set, need_measurement_ready): |
13 super(ToughAnimationCasesPage, self).__init__(url=url, page_set=page_set) | 13 super(ToughAnimationCasesPage, self).__init__(url=url, page_set=page_set) |
14 self.archive_data_file = 'data/tough_animation_cases.json' | 14 self.archive_data_file = 'data/tough_animation_cases.json' |
15 self._need_measurement_ready = need_measurement_ready | 15 self._need_measurement_ready = need_measurement_ready |
16 | 16 |
17 def RunNavigateSteps(self, action_runner): | 17 def RunNavigateSteps(self, action_runner): |
18 action_runner.NavigateToPage(self) | 18 action_runner.NavigateToPage(self) |
19 if self._need_measurement_ready: | 19 if self._need_measurement_ready: |
20 action_runner.WaitForJavaScriptCondition('measurementReady') | 20 action_runner.WaitForJavaScriptCondition('window.measurementReady') |
21 | 21 |
22 def RunSmoothness(self, action_runner): | 22 def RunSmoothness(self, action_runner): |
23 action_runner.Wait(10) | 23 action_runner.Wait(10) |
24 | 24 |
25 class ToughAnimationCasesPageSet(page_set_module.PageSet): | 25 class ToughAnimationCasesPageSet(page_set_module.PageSet): |
26 | 26 |
27 """ | 27 """ |
28 Description: A collection of animation performance tests | 28 Description: A collection of animation performance tests |
29 """ | 29 """ |
30 | 30 |
(...skipping 18 matching lines...) Expand all Loading... |
49 # Why: Tests the balls animation implemented with CSS transitions on 2 | 49 # Why: Tests the balls animation implemented with CSS transitions on 2 |
50 # properties. | 50 # properties. |
51 'file://tough_animation_cases/balls_css_transition_2_properties.html', | 51 'file://tough_animation_cases/balls_css_transition_2_properties.html', |
52 # Why: Tests the balls animation implemented with CSS transitions on 40 | 52 # Why: Tests the balls animation implemented with CSS transitions on 40 |
53 # properties. | 53 # properties. |
54 'file://tough_animation_cases/balls_css_transition_40_properties.html', | 54 'file://tough_animation_cases/balls_css_transition_40_properties.html', |
55 # Why: Tests the balls animation implemented with CSS transitions on all | 55 # Why: Tests the balls animation implemented with CSS transitions on all |
56 # animatable properties. | 56 # animatable properties. |
57 'file://tough_animation_cases/balls_css_transition_all_properties.html', | 57 'file://tough_animation_cases/balls_css_transition_all_properties.html', |
58 # pylint: disable=C0301 | 58 # pylint: disable=C0301 |
59 'file://tough_animation_cases/overlay_background_color_css_transitions.htm
l' | 59 'file://tough_animation_cases/overlay_background_color_css_transitions.htm
l', |
| 60 # Why: Tests Web Animations running with hundreds of keyframes. |
| 61 'file://tough_animation_cases/web_animations_many_keyframes.html?N=0032', |
| 62 'file://tough_animation_cases/web_animations_many_keyframes.html?N=0100', |
| 63 'file://tough_animation_cases/web_animations_many_keyframes.html?N=0316', |
| 64 'file://tough_animation_cases/web_animations_many_keyframes.html?N=1000', |
| 65 # Why: Tests many Web Animations starting simultaneously. |
| 66 'file://tough_animation_cases/web_animations_simultaneous.html?N=0032', |
| 67 'file://tough_animation_cases/web_animations_simultaneous.html?N=0100', |
| 68 'file://tough_animation_cases/web_animations_simultaneous.html?N=0316', |
| 69 'file://tough_animation_cases/web_animations_simultaneous.html?N=1000', |
| 70 # Why: Tests many Web Animations chaining off the onfinish event. |
| 71 'file://tough_animation_cases/web_animations_staggered_chaining.html?N=003
2', |
| 72 'file://tough_animation_cases/web_animations_staggered_chaining.html?N=010
0', |
| 73 'file://tough_animation_cases/web_animations_staggered_chaining.html?N=031
6', |
| 74 'file://tough_animation_cases/web_animations_staggered_chaining.html?N=100
0', |
| 75 # Why: Tests many Web Animations running with infinite iterations. |
| 76 'file://tough_animation_cases/web_animations_staggered_infinite_iterations
.html?N=0032', |
| 77 'file://tough_animation_cases/web_animations_staggered_infinite_iterations
.html?N=0100', |
| 78 'file://tough_animation_cases/web_animations_staggered_infinite_iterations
.html?N=0316', |
| 79 'file://tough_animation_cases/web_animations_staggered_infinite_iterations
.html?N=1000', |
| 80 # Why: Tests many Web Animations all starting at different times. |
| 81 'file://tough_animation_cases/web_animations_staggered_triggering.html?N=0
032', |
| 82 'file://tough_animation_cases/web_animations_staggered_triggering.html?N=0
100', |
| 83 'file://tough_animation_cases/web_animations_staggered_triggering.html?N=0
316', |
| 84 'file://tough_animation_cases/web_animations_staggered_triggering.html?N=1
000', |
60 ] | 85 ] |
61 | 86 |
62 for url in urls_list_one: | 87 for url in urls_list_one: |
63 self.AddPage(ToughAnimationCasesPage(url, self, | 88 self.AddPage(ToughAnimationCasesPage(url, self, |
64 need_measurement_ready=True)) | 89 need_measurement_ready=True)) |
65 | 90 |
66 urls_list_two = [ | 91 urls_list_two = [ |
67 # Why: Tests various keyframed animations. | 92 # Why: Tests various keyframed animations. |
68 'file://tough_animation_cases/keyframed_animations.html', | 93 'file://tough_animation_cases/keyframed_animations.html', |
69 # Why: Tests various transitions. | 94 # Why: Tests various transitions. |
70 'file://tough_animation_cases/transform_transitions.html', | 95 'file://tough_animation_cases/transform_transitions.html', |
71 # Why: Login page is slow because of ineffecient transform operations. | 96 # Why: Login page is slow because of ineffecient transform operations. |
72 'http://ie.microsoft.com/testdrive/performance/robohornetpro/', | 97 'http://ie.microsoft.com/testdrive/performance/robohornetpro/', |
73 # Why: JS execution blocks CSS transition unless initial transform is set. | 98 # Why: JS execution blocks CSS transition unless initial transform is set. |
74 'file://tough_animation_cases/transform_transition_js_block.html' | 99 'file://tough_animation_cases/transform_transition_js_block.html' |
75 ] | 100 ] |
76 | 101 |
77 for url in urls_list_two: | 102 for url in urls_list_two: |
78 self.AddPage(ToughAnimationCasesPage(url, self, | 103 self.AddPage(ToughAnimationCasesPage(url, self, |
79 need_measurement_ready=False)) | 104 need_measurement_ready=False)) |
OLD | NEW |