Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / tools / perf / page_sets / tough_animation_cases.py
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
3 # found in the LICENSE file.
4 from telemetry.page import page as page_module
5 from telemetry.page import page_set as page_set_module
6
7
8 class ToughAnimationCasesPage(page_module.Page):
9
10   def __init__(self, url, page_set, need_measurement_ready):
11     super(ToughAnimationCasesPage, self).__init__(url=url, page_set=page_set)
12     self.archive_data_file = 'data/tough_animation_cases.json'
13     self._need_measurement_ready = need_measurement_ready
14
15   def RunNavigateSteps(self, action_runner):
16     action_runner.NavigateToPage(self)
17     if self._need_measurement_ready:
18       action_runner.WaitForJavaScriptCondition('window.measurementReady')
19
20   def RunSmoothness(self, action_runner):
21     action_runner.Wait(10)
22
23 class ToughAnimationCasesPageSet(page_set_module.PageSet):
24
25   """
26   Description: A collection of animation performance tests
27   """
28
29   def __init__(self):
30     super(ToughAnimationCasesPageSet, self).__init__(
31       archive_data_file='data/tough_animation_cases.json',
32       bucket=page_set_module.PARTNER_BUCKET)
33
34     urls_list_one = [
35       # Why: Tests the balls animation implemented with SVG animations.
36       'file://tough_animation_cases/balls_svg_animations.html',
37       # Why: Tests the balls animation implemented with Javascript and canvas.
38       'file://tough_animation_cases/balls_javascript_canvas.html',
39       # Why: Tests the balls animation implemented with Javascript and CSS.
40       'file://tough_animation_cases/balls_javascript_css.html',
41       # Why: Tests the balls animation implemented with CSS keyframe animations.
42       'file://tough_animation_cases/balls_css_keyframe_animations.html',
43       # Why: Tests the balls animation implemented with transforms and CSS
44       # keyframe animations to be run on the compositor thread.
45       # pylint: disable=C0301
46       'file://tough_animation_cases/balls_css_keyframe_animations_composited_transform.html',
47       # Why: Tests the balls animation implemented with CSS transitions on 2
48       # properties.
49       'file://tough_animation_cases/balls_css_transition_2_properties.html',
50       # Why: Tests the balls animation implemented with CSS transitions on 40
51       # properties.
52       'file://tough_animation_cases/balls_css_transition_40_properties.html',
53       # Why: Tests the balls animation implemented with CSS transitions on all
54       # animatable properties.
55       'file://tough_animation_cases/balls_css_transition_all_properties.html',
56       # pylint: disable=C0301
57       'file://tough_animation_cases/overlay_background_color_css_transitions.html',
58
59       # Why: Tests many CSS Transitions all starting at the same time triggered
60       # by inserting new elements.
61       # pylint: disable=C0301
62       'file://tough_animation_cases/css_transitions_simultaneous_by_inserting_new_element.html?N=0316',
63       # Why: Tests many CSS Transitions all starting at the same time triggered
64       # by inserting style sheets.
65       # pylint: disable=C0301
66       'file://tough_animation_cases/css_transitions_simultaneous_by_inserting_style_element.html?N=0316',
67       # Why: Tests many CSS Transitions all starting at the same time triggered
68       # by updating class.
69       # pylint: disable=C0301
70       'file://tough_animation_cases/css_transitions_simultaneous_by_updating_class.html?N=0316',
71       # Why: Tests many CSS Transitions all starting at the same time triggered
72       # by updating inline style.
73       # pylint: disable=C0301
74       'file://tough_animation_cases/css_transitions_simultaneous_by_updating_inline_style.html?N=0316',
75       # Why: Tests many CSS Transitions chained together using events at
76       # different times triggered by inserting new elements.
77       # pylint: disable=C0301
78       'file://tough_animation_cases/css_transitions_staggered_chaining_by_inserting_new_element.html?N=0316',
79       # Why: Tests many CSS Transitions chained together using events at
80       # different times triggered by inserting style sheets.
81       # pylint: disable=C0301
82       'file://tough_animation_cases/css_transitions_staggered_chaining_by_inserting_style_element.html?N=0316',
83       # Why: Tests many CSS Transitions chained together using events at
84       # different times triggered by updating class.
85       # pylint: disable=C0301
86       'file://tough_animation_cases/css_transitions_staggered_chaining_by_updating_class.html?N=0316',
87       # Why: Tests many CSS Transitions chained together using events at
88       # different times triggered by updating inline style.
89       # pylint: disable=C0301
90       'file://tough_animation_cases/css_transitions_staggered_chaining_by_updating_inline_style.html?N=0316',
91       # Why: Tests many CSS Transitions starting at different times triggered by
92       # inserting new elements.
93       # pylint: disable=C0301
94       'file://tough_animation_cases/css_transitions_staggered_triggering_by_inserting_new_element.html?N=0316',
95       # Why: Tests many CSS Transitions starting at different times triggered by
96       # inserting style sheets.
97       # pylint: disable=C0301
98       'file://tough_animation_cases/css_transitions_staggered_triggering_by_inserting_style_element.html?N=0316',
99       # Why: Tests many CSS Transitions starting at different times triggered by
100       # updating class.
101       # pylint: disable=C0301
102       'file://tough_animation_cases/css_transitions_staggered_triggering_by_updating_class.html?N=0316',
103       # Why: Tests many CSS Transitions starting at different times triggered by
104       # updating inline style.
105       # pylint: disable=C0301
106       'file://tough_animation_cases/css_transitions_staggered_triggering_by_updating_inline_style.html?N=0316',
107
108       # Why: Tests many CSS Animations all starting at the same time with 500
109       # keyframes each.
110       'file://tough_animation_cases/css_animations_many_keyframes.html?N=0316',
111       # Why: Tests many CSS Animations all starting at the same time triggered
112       # by inserting new elements.
113       # pylint: disable=C0301
114       'file://tough_animation_cases/css_animations_simultaneous_by_inserting_new_element.html?N=0316',
115       # Why: Tests many CSS Animations all starting at the same time triggered
116       # by inserting style sheets.
117       # pylint: disable=C0301
118       'file://tough_animation_cases/css_animations_simultaneous_by_inserting_style_element.html?N=0316',
119       # Why: Tests many CSS Animations all starting at the same time triggered
120       # by updating class.
121       # pylint: disable=C0301
122       'file://tough_animation_cases/css_animations_simultaneous_by_updating_class.html?N=0316',
123       # Why: Tests many CSS Animations all starting at the same time triggered
124       # by updating inline style.
125       # pylint: disable=C0301
126       'file://tough_animation_cases/css_animations_simultaneous_by_updating_inline_style.html?N=0316',
127       # Why: Tests many CSS Animations chained together using events at
128       # different times triggered by inserting new elements.
129       # pylint: disable=C0301
130       'file://tough_animation_cases/css_animations_staggered_chaining_by_inserting_new_element.html?N=0316',
131       # Why: Tests many CSS Animations chained together using events at
132       # different times triggered by inserting style sheets.
133       # pylint: disable=C0301
134       'file://tough_animation_cases/css_animations_staggered_chaining_by_inserting_style_element.html?N=0316',
135       # Why: Tests many CSS Animations chained together using events at
136       # different times triggered by updating class.
137       # pylint: disable=C0301
138       'file://tough_animation_cases/css_animations_staggered_chaining_by_updating_class.html?N=0316',
139       # Why: Tests many CSS Animations chained together using events at
140       # different times triggered by updating inline style.
141       # pylint: disable=C0301
142       'file://tough_animation_cases/css_animations_staggered_chaining_by_updating_inline_style.html?N=0316',
143       # Why: Tests many CSS Animations starting at different times triggered by
144       # inserting new elements.
145       # pylint: disable=C0301
146       'file://tough_animation_cases/css_animations_staggered_triggering_by_inserting_new_element.html?N=0316',
147       # Why: Tests many CSS Animations all starting at the same time with
148       # staggered animation offsets.
149       # pylint: disable=C0301
150       'file://tough_animation_cases/css_animations_staggered_infinite_iterations.html?N=0316',
151       # Why: Tests many CSS Animations starting at different times triggered by
152       # inserting style sheets.
153       # pylint: disable=C0301
154       'file://tough_animation_cases/css_animations_staggered_triggering_by_inserting_style_element.html?N=0316',
155       # Why: Tests many CSS Animations starting at different times triggered by
156       # updating class.
157       # pylint: disable=C0301
158       'file://tough_animation_cases/css_animations_staggered_triggering_by_updating_class.html?N=0316',
159       # Why: Tests many CSS Animations starting at different times triggered by
160       # updating inline style.
161       # pylint: disable=C0301
162       'file://tough_animation_cases/css_animations_staggered_triggering_by_updating_inline_style.html?N=0316',
163
164       # Why: Tests many Web Animations all starting at the same time with 500
165       # keyframes each.
166       'file://tough_animation_cases/web_animations_many_keyframes.html?N=0316',
167       # Why: Tests many paused Web Animations having their currentTimes updated
168       # in every requestAnimationFrame.
169       # pylint: disable=C0301
170       'file://tough_animation_cases/web_animations_set_current_time_in_raf.html?N=0316',
171       # Why: Tests many Web Animations all starting at the same time.
172       'file://tough_animation_cases/web_animations_simultaneous.html?N=0316',
173       # Why: Tests many Web Animations all starting at different times then
174       # chained together using events.
175       # pylint: disable=C0301
176       'file://tough_animation_cases/web_animations_staggered_chaining.html?N=0316',
177       # Why: Tests many Web Animations all starting at different times with
178       # infinite iterations.
179       # pylint: disable=C0301
180       'file://tough_animation_cases/web_animations_staggered_infinite_iterations.html?N=0316',
181       # Why: Tests many Web Animations all starting at different times.
182       # pylint: disable=C0301
183       'file://tough_animation_cases/web_animations_staggered_triggering.html?N=0316',
184     ]
185
186     for url in urls_list_one:
187       self.AddPage(ToughAnimationCasesPage(url, self,
188                                            need_measurement_ready=True))
189
190     urls_list_two = [
191       # Why: Tests various keyframed animations.
192       'file://tough_animation_cases/keyframed_animations.html',
193       # Why: Tests various transitions.
194       'file://tough_animation_cases/transform_transitions.html',
195       # Why: JS execution blocks CSS transition unless initial transform is set.
196       'file://tough_animation_cases/transform_transition_js_block.html'
197
198       # Disabled: crbug.com/350692
199       # Why: Login page is slow because of ineffecient transform operations.
200       # 'http://ie.microsoft.com/testdrive/performance/robohornetpro/',
201     ]
202
203     for url in urls_list_two:
204       self.AddPage(ToughAnimationCasesPage(url, self,
205                                            need_measurement_ready=False))