forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtough_animation_cases.py
253 lines (235 loc) · 14 KB
/
tough_animation_cases.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class ToughAnimationCasesPage(page_module.Page):
def __init__(self, url, page_set, need_measurement_ready):
super(ToughAnimationCasesPage, self).__init__(url=url, page_set=page_set)
self.archive_data_file = 'data/tough_animation_cases.json'
self._need_measurement_ready = need_measurement_ready
def RunNavigateSteps(self, action_runner):
super(ToughAnimationCasesPage, self).RunNavigateSteps(action_runner)
if self._need_measurement_ready:
action_runner.WaitForJavaScriptCondition('window.measurementReady')
def RunPageInteractions(self, action_runner):
with action_runner.CreateInteraction('ToughAnimation'):
action_runner.Wait(10)
class ToughAnimationCasesPageSet(page_set_module.PageSet):
"""
Description: A collection of animation performance tests
"""
def __init__(self):
super(ToughAnimationCasesPageSet, self).__init__(
archive_data_file='data/tough_animation_cases.json',
bucket=page_set_module.PARTNER_BUCKET)
urls_list_one = [
# Why: Tests the balls animation implemented with SVG animations.
'file://tough_animation_cases/balls_svg_animations.html',
# Why: Tests the balls animation implemented with Javascript and canvas.
'file://tough_animation_cases/balls_javascript_canvas.html',
# Why: Tests the balls animation implemented with Javascript and CSS.
'file://tough_animation_cases/balls_javascript_css.html',
# Why: Tests the balls animation implemented with CSS keyframe animations.
'file://tough_animation_cases/balls_css_keyframe_animations.html',
# Why: Tests the balls animation implemented with transforms and CSS
# keyframe animations to be run on the compositor thread.
# pylint: disable=C0301
'file://tough_animation_cases/balls_css_keyframe_animations_composited_transform.html',
# Why: Tests the balls animation implemented with CSS transitions on 2
# properties.
'file://tough_animation_cases/balls_css_transition_2_properties.html',
# Why: Tests the balls animation implemented with CSS transitions on 40
# properties.
'file://tough_animation_cases/balls_css_transition_40_properties.html',
# Why: Tests the balls animation implemented with CSS transitions on all
# animatable properties.
'file://tough_animation_cases/balls_css_transition_all_properties.html',
# pylint: disable=C0301
'file://tough_animation_cases/overlay_background_color_css_transitions.html',
# Why: Tests many CSS Transitions all starting at the same time triggered
# by inserting new elements.
# pylint: disable=C0301
'file://tough_animation_cases/css_transitions_simultaneous_by_inserting_new_element.html?N=0316',
# Why: Tests many CSS Transitions all starting at the same time triggered
# by inserting style sheets.
# pylint: disable=C0301
'file://tough_animation_cases/css_transitions_simultaneous_by_inserting_style_element.html?N=0316',
# Why: Tests many CSS Transitions all starting at the same time triggered
# by updating class.
# pylint: disable=C0301
'file://tough_animation_cases/css_transitions_simultaneous_by_updating_class.html?N=0316',
# Why: Tests many CSS Transitions all starting at the same time triggered
# by updating inline style.
# pylint: disable=C0301
'file://tough_animation_cases/css_transitions_simultaneous_by_updating_inline_style.html?N=0316',
# Why: Tests many CSS Transitions chained together using events at
# different times triggered by inserting new elements.
# pylint: disable=C0301
'file://tough_animation_cases/css_transitions_staggered_chaining_by_inserting_new_element.html?N=0316',
# Why: Tests many CSS Transitions chained together using events at
# different times triggered by inserting style sheets.
# pylint: disable=C0301
'file://tough_animation_cases/css_transitions_staggered_chaining_by_inserting_style_element.html?N=0316',
# Why: Tests many CSS Transitions chained together using events at
# different times triggered by updating class.
# pylint: disable=C0301
'file://tough_animation_cases/css_transitions_staggered_chaining_by_updating_class.html?N=0316',
# Why: Tests many CSS Transitions chained together using events at
# different times triggered by updating inline style.
# pylint: disable=C0301
'file://tough_animation_cases/css_transitions_staggered_chaining_by_updating_inline_style.html?N=0316',
# Why: Tests many CSS Transitions starting at different times triggered by
# inserting new elements.
# pylint: disable=C0301
'file://tough_animation_cases/css_transitions_staggered_triggering_by_inserting_new_element.html?N=0316',
# Why: Tests many CSS Transitions starting at different times triggered by
# inserting style sheets.
# pylint: disable=C0301
'file://tough_animation_cases/css_transitions_staggered_triggering_by_inserting_style_element.html?N=0316',
# Why: Tests many CSS Transitions starting at different times triggered by
# updating class.
# pylint: disable=C0301
'file://tough_animation_cases/css_transitions_staggered_triggering_by_updating_class.html?N=0316',
# Why: Tests many CSS Transitions starting at different times triggered by
# updating inline style.
# pylint: disable=C0301
'file://tough_animation_cases/css_transitions_staggered_triggering_by_updating_inline_style.html?N=0316',
# Why: Tests many CSS Animations all starting at the same time with 500
# keyframes each.
'file://tough_animation_cases/css_animations_many_keyframes.html?N=0316',
# Why: Tests many CSS Animations all starting at the same time triggered
# by inserting new elements.
# pylint: disable=C0301
'file://tough_animation_cases/css_animations_simultaneous_by_inserting_new_element.html?N=0316',
# Why: Tests many CSS Animations all starting at the same time triggered
# by inserting style sheets.
# pylint: disable=C0301
'file://tough_animation_cases/css_animations_simultaneous_by_inserting_style_element.html?N=0316',
# Why: Tests many CSS Animations all starting at the same time triggered
# by updating class.
# pylint: disable=C0301
'file://tough_animation_cases/css_animations_simultaneous_by_updating_class.html?N=0316',
# Why: Tests many CSS Animations all starting at the same time triggered
# by updating inline style.
# pylint: disable=C0301
'file://tough_animation_cases/css_animations_simultaneous_by_updating_inline_style.html?N=0316',
# Why: Tests many CSS Animations chained together using events at
# different times triggered by inserting new elements.
# pylint: disable=C0301
'file://tough_animation_cases/css_animations_staggered_chaining_by_inserting_new_element.html?N=0316',
# Why: Tests many CSS Animations chained together using events at
# different times triggered by inserting style sheets.
# pylint: disable=C0301
'file://tough_animation_cases/css_animations_staggered_chaining_by_inserting_style_element.html?N=0316',
# Why: Tests many CSS Animations chained together using events at
# different times triggered by updating class.
# pylint: disable=C0301
'file://tough_animation_cases/css_animations_staggered_chaining_by_updating_class.html?N=0316',
# Why: Tests many CSS Animations chained together using events at
# different times triggered by updating inline style.
# pylint: disable=C0301
'file://tough_animation_cases/css_animations_staggered_chaining_by_updating_inline_style.html?N=0316',
# Why: Tests many CSS Animations starting at different times triggered by
# inserting new elements.
# pylint: disable=C0301
'file://tough_animation_cases/css_animations_staggered_triggering_by_inserting_new_element.html?N=0316',
# Why: Tests many CSS Animations all starting at the same time with
# staggered animation offsets.
# pylint: disable=C0301
'file://tough_animation_cases/css_animations_staggered_infinite_iterations.html?N=0316',
# Why: Tests many CSS Animations starting at different times triggered by
# inserting style sheets.
# pylint: disable=C0301
'file://tough_animation_cases/css_animations_staggered_triggering_by_inserting_style_element.html?N=0316',
# Why: Tests many CSS Animations starting at different times triggered by
# updating class.
# pylint: disable=C0301
'file://tough_animation_cases/css_animations_staggered_triggering_by_updating_class.html?N=0316',
# Why: Tests many CSS Animations starting at different times triggered by
# updating inline style.
# pylint: disable=C0301
'file://tough_animation_cases/css_animations_staggered_triggering_by_updating_inline_style.html?N=0316',
# Why: Tests many Web Animations all starting at the same time with 500
# keyframes each.
'file://tough_animation_cases/web_animations_many_keyframes.html?N=0316',
# Why: Tests many paused Web Animations having their currentTimes updated
# in every requestAnimationFrame.
# pylint: disable=C0301
'file://tough_animation_cases/web_animations_set_current_time_in_raf.html?N=0316',
# Why: Tests many Web Animations all starting at the same time.
'file://tough_animation_cases/web_animations_simultaneous.html?N=0316',
# Why: Tests many Web Animations all starting at different times then
# chained together using events.
# pylint: disable=C0301
'file://tough_animation_cases/web_animations_staggered_chaining.html?N=0316',
# Why: Tests many Web Animations all starting at different times with
# infinite iterations.
# pylint: disable=C0301
'file://tough_animation_cases/web_animations_staggered_infinite_iterations.html?N=0316',
# Why: Tests many Web Animations all starting at different times.
# pylint: disable=C0301
'file://tough_animation_cases/web_animations_staggered_triggering.html?N=0316',
# Why: Tests color animations using CSS Animations.
# pylint: disable=C0301
'file://tough_animation_cases/css_value_type_color.html?api=css_animations&N=0316',
# Why: Tests filter animations using CSS Animations.
# pylint: disable=C0301
'file://tough_animation_cases/css_value_type_filter.html?api=css_animations&N=0316',
# Why: Tests length 3D animations using CSS Animations.
# pylint: disable=C0301
'file://tough_animation_cases/css_value_type_length_3d.html?api=css_animations&N=0316',
# Why: Tests complex length animations using CSS Animations.
# pylint: disable=C0301
'file://tough_animation_cases/css_value_type_length_complex.html?api=css_animations&N=0316',
# Why: Tests simple length animations using CSS Animations.
# pylint: disable=C0301
'file://tough_animation_cases/css_value_type_length_simple.html?api=css_animations&N=0316',
# Why: Tests shadow animations using CSS Animations.
# pylint: disable=C0301
'file://tough_animation_cases/css_value_type_shadow.html?api=css_animations&N=0316',
# Why: Tests complex transform animations using CSS Animations.
# pylint: disable=C0301
'file://tough_animation_cases/css_value_type_transform_complex.html?api=css_animations&N=0316',
# Why: Tests simple transform animations using CSS Animations.
# pylint: disable=C0301
'file://tough_animation_cases/css_value_type_transform_simple.html?api=css_animations&N=0316',
# Why: Tests color animations using Web Animations.
# pylint: disable=C0301
'file://tough_animation_cases/css_value_type_color.html?api=web_animations&N=0316',
# Why: Tests length 3D animations using Web Animations.
# pylint: disable=C0301
'file://tough_animation_cases/css_value_type_length_3d.html?api=web_animations&N=0316',
# Why: Tests complex length animations using Web Animations.
# pylint: disable=C0301
'file://tough_animation_cases/css_value_type_length_complex.html?api=web_animations&N=0316',
# Why: Tests simple length animations using Web Animations.
# pylint: disable=C0301
'file://tough_animation_cases/css_value_type_length_simple.html?api=web_animations&N=0316',
# Why: Tests shadow animations using Web Animations.
# pylint: disable=C0301
'file://tough_animation_cases/css_value_type_shadow.html?api=web_animations&N=0316',
# Why: Tests complex transform animations using Web Animations.
# pylint: disable=C0301
'file://tough_animation_cases/css_value_type_transform_complex.html?api=web_animations&N=0316',
# Why: Tests simple transform animations using Web Animations.
# pylint: disable=C0301
'file://tough_animation_cases/css_value_type_transform_simple.html?api=web_animations&N=0316',
]
for url in urls_list_one:
self.AddUserStory(ToughAnimationCasesPage(url, self,
need_measurement_ready=True))
urls_list_two = [
# Why: Tests various keyframed animations.
'file://tough_animation_cases/keyframed_animations.html',
# Why: Tests various transitions.
'file://tough_animation_cases/transform_transitions.html',
# Why: JS execution blocks CSS transition unless initial transform is set.
'file://tough_animation_cases/transform_transition_js_block.html'
# Disabled: crbug.com/350692
# Why: Login page is slow because of ineffecient transform operations.
# 'http://ie.microsoft.com/testdrive/performance/robohornetpro/',
]
for url in urls_list_two:
self.AddUserStory(ToughAnimationCasesPage(url, self,
need_measurement_ready=False))