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.page import page as page_module | 4 from telemetry.page import page as page_module |
5 from telemetry.page import page_set as page_set_module | 5 from telemetry.page import page_set as page_set_module |
6 | 6 |
7 | 7 |
8 class ToughVideoCasesPage(page_module.Page): | 8 class ToughVideoCasesPage(page_module.Page): |
9 | 9 |
10 def __init__(self, url, page_set): | 10 def __init__(self, url, page_set, labels=None): |
11 super(ToughVideoCasesPage, self).__init__(url=url, page_set=page_set) | 11 super(ToughVideoCasesPage, self).__init__( |
| 12 url=url, page_set=page_set, labels=labels) |
12 | 13 |
13 def LoopMixedAudio(self, action_runner): | 14 def LoopMixedAudio(self, action_runner): |
14 action_runner.PlayMedia(selector='#background_audio', | 15 action_runner.PlayMedia(selector='#background_audio', |
15 playing_event_timeout_in_seconds=60) | 16 playing_event_timeout_in_seconds=60) |
16 action_runner.LoopMedia(loop_count=50, selector='#mixed_audio') | 17 action_runner.LoopMedia(loop_count=50, selector='#mixed_audio') |
17 | 18 |
18 def LoopSingleAudio(self, action_runner): | 19 def LoopSingleAudio(self, action_runner): |
19 action_runner.LoopMedia(loop_count=50, selector='#single_audio') | 20 action_runner.LoopMedia(loop_count=50, selector='#single_audio') |
20 | 21 |
21 def PlayAction(self, action_runner): | 22 def PlayAction(self, action_runner): |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 74 |
74 def RunPageInteractions(self, action_runner): | 75 def RunPageInteractions(self, action_runner): |
75 self.PlayAction(action_runner) | 76 self.PlayAction(action_runner) |
76 | 77 |
77 | 78 |
78 class Page4(ToughVideoCasesPage): | 79 class Page4(ToughVideoCasesPage): |
79 | 80 |
80 def __init__(self, page_set): | 81 def __init__(self, page_set): |
81 super(Page4, self).__init__( | 82 super(Page4, self).__init__( |
82 url='file://tough_video_cases/video.html?src=crowd1080.webm', | 83 url='file://tough_video_cases/video.html?src=crowd1080.webm', |
83 page_set=page_set) | 84 page_set=page_set, labels=['is_50fps']) |
84 | 85 |
85 self.add_browser_metrics = True | 86 self.add_browser_metrics = True |
86 self.is_50fps = True | |
87 | 87 |
88 def RunPageInteractions(self, action_runner): | 88 def RunPageInteractions(self, action_runner): |
89 self.PlayAction(action_runner) | 89 self.PlayAction(action_runner) |
90 | 90 |
91 | 91 |
92 class Page5(ToughVideoCasesPage): | 92 class Page5(ToughVideoCasesPage): |
93 | 93 |
94 def __init__(self, page_set): | 94 def __init__(self, page_set): |
95 super(Page5, self).__init__( | 95 super(Page5, self).__init__( |
96 url='file://tough_video_cases/video.html?src=crowd2160.ogv', | 96 url='file://tough_video_cases/video.html?src=crowd2160.ogv', |
97 page_set=page_set) | 97 page_set=page_set, labels=['is_4k', 'is_50fps']) |
98 | 98 |
99 self.add_browser_metrics = True | 99 self.add_browser_metrics = True |
100 self.is_4k = True | |
101 self.is_50fps = True | |
102 | 100 |
103 def RunPageInteractions(self, action_runner): | 101 def RunPageInteractions(self, action_runner): |
104 self.PlayAction(action_runner) | 102 self.PlayAction(action_runner) |
105 | 103 |
106 | 104 |
107 class Page6(ToughVideoCasesPage): | 105 class Page6(ToughVideoCasesPage): |
108 | 106 |
109 def __init__(self, page_set): | 107 def __init__(self, page_set): |
110 super(Page6, self).__init__( | 108 super(Page6, self).__init__( |
111 url='file://tough_video_cases/video.html?src=crowd2160.webm', | 109 url='file://tough_video_cases/video.html?src=crowd2160.webm', |
112 page_set=page_set) | 110 page_set=page_set, labels=['is_4k', 'is_50fps']) |
113 | 111 |
114 self.add_browser_metrics = True | 112 self.add_browser_metrics = True |
115 self.is_4k = True | |
116 self.is_50fps = True | |
117 | 113 |
118 def RunPageInteractions(self, action_runner): | 114 def RunPageInteractions(self, action_runner): |
119 self.PlayAction(action_runner) | 115 self.PlayAction(action_runner) |
120 | 116 |
121 | 117 |
122 class Page7(ToughVideoCasesPage): | 118 class Page7(ToughVideoCasesPage): |
123 | 119 |
124 def __init__(self, page_set): | 120 def __init__(self, page_set): |
125 super(Page7, self).__init__( | 121 super(Page7, self).__init__( |
126 url='file://tough_video_cases/video.html?src=tulip2.ogg&type=audio', | 122 url='file://tough_video_cases/video.html?src=tulip2.ogg&type=audio', |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 165 |
170 def RunPageInteractions(self, action_runner): | 166 def RunPageInteractions(self, action_runner): |
171 self.PlayAction(action_runner) | 167 self.PlayAction(action_runner) |
172 | 168 |
173 | 169 |
174 class Page11(ToughVideoCasesPage): | 170 class Page11(ToughVideoCasesPage): |
175 | 171 |
176 def __init__(self, page_set): | 172 def __init__(self, page_set): |
177 super(Page11, self).__init__( | 173 super(Page11, self).__init__( |
178 url='file://tough_video_cases/video.html?src=crowd1080.mp4', | 174 url='file://tough_video_cases/video.html?src=crowd1080.mp4', |
179 page_set=page_set) | 175 page_set=page_set, labels=['is_50fps']) |
180 | 176 |
181 self.add_browser_metrics = True | 177 self.add_browser_metrics = True |
182 self.is_50fps = True | |
183 | 178 |
184 def RunPageInteractions(self, action_runner): | 179 def RunPageInteractions(self, action_runner): |
185 self.PlayAction(action_runner) | 180 self.PlayAction(action_runner) |
186 | 181 |
187 | 182 |
188 class Page12(ToughVideoCasesPage): | 183 class Page12(ToughVideoCasesPage): |
189 | 184 |
190 def __init__(self, page_set): | 185 def __init__(self, page_set): |
191 super(Page12, self).__init__( | 186 super(Page12, self).__init__( |
192 url='file://tough_video_cases/video.html?src=crowd2160.mp4', | 187 url='file://tough_video_cases/video.html?src=crowd2160.mp4', |
193 page_set=page_set) | 188 page_set=page_set, labels=['is_4k', 'is_50fps']) |
194 | 189 |
195 self.add_browser_metrics = True | 190 self.add_browser_metrics = True |
196 self.is_4k = True | |
197 self.is_50fps = True | |
198 | 191 |
199 def RunPageInteractions(self, action_runner): | 192 def RunPageInteractions(self, action_runner): |
200 self.PlayAction(action_runner) | 193 self.PlayAction(action_runner) |
201 | 194 |
202 | 195 |
203 class Page13(ToughVideoCasesPage): | 196 class Page13(ToughVideoCasesPage): |
204 | 197 |
205 def __init__(self, page_set): | 198 def __init__(self, page_set): |
206 super(Page13, self).__init__( | 199 super(Page13, self).__init__( |
207 url='file://tough_video_cases/video.html?src=tulip2.mp3&type=audio', | 200 url='file://tough_video_cases/video.html?src=tulip2.mp3&type=audio', |
(...skipping 29 matching lines...) Expand all Loading... |
237 | 230 |
238 def RunPageInteractions(self, action_runner): | 231 def RunPageInteractions(self, action_runner): |
239 self.PlayAction(action_runner) | 232 self.PlayAction(action_runner) |
240 | 233 |
241 | 234 |
242 class Page16(ToughVideoCasesPage): | 235 class Page16(ToughVideoCasesPage): |
243 | 236 |
244 def __init__(self, page_set): | 237 def __init__(self, page_set): |
245 super(Page16, self).__init__( | 238 super(Page16, self).__init__( |
246 url='file://tough_video_cases/video.html?src=garden2_10s.webm', | 239 url='file://tough_video_cases/video.html?src=garden2_10s.webm', |
247 page_set=page_set) | 240 page_set=page_set, labels=['is_4k']) |
248 | 241 |
249 self.is_4k = True | |
250 self.add_browser_metrics = True | 242 self.add_browser_metrics = True |
251 | 243 |
252 def RunPageInteractions(self, action_runner): | 244 def RunPageInteractions(self, action_runner): |
253 self.PlayAction(action_runner) | 245 self.PlayAction(action_runner) |
254 | 246 |
255 | 247 |
256 class Page17(ToughVideoCasesPage): | 248 class Page17(ToughVideoCasesPage): |
257 | 249 |
258 def __init__(self, page_set): | 250 def __init__(self, page_set): |
259 super(Page17, self).__init__( | 251 super(Page17, self).__init__( |
260 url='file://tough_video_cases/video.html?src=garden2_10s.mp4', | 252 url='file://tough_video_cases/video.html?src=garden2_10s.mp4', |
261 page_set=page_set) | 253 page_set=page_set, labels=['is_4k']) |
262 | 254 |
263 self.is_4k = True | |
264 self.add_browser_metrics = True | 255 self.add_browser_metrics = True |
265 | 256 |
266 def RunPageInteractions(self, action_runner): | 257 def RunPageInteractions(self, action_runner): |
267 self.PlayAction(action_runner) | 258 self.PlayAction(action_runner) |
268 | 259 |
269 | 260 |
270 class Page18(ToughVideoCasesPage): | 261 class Page18(ToughVideoCasesPage): |
271 | 262 |
272 def __init__(self, page_set): | 263 def __init__(self, page_set): |
273 super(Page18, self).__init__( | 264 super(Page18, self).__init__( |
274 url='file://tough_video_cases/video.html?src=garden2_10s.ogv', | 265 url='file://tough_video_cases/video.html?src=garden2_10s.ogv', |
275 page_set=page_set) | 266 page_set=page_set, labels=['is_4k']) |
276 | 267 |
277 self.is_4k = True | |
278 self.add_browser_metrics = True | 268 self.add_browser_metrics = True |
279 | 269 |
280 def RunPageInteractions(self, action_runner): | 270 def RunPageInteractions(self, action_runner): |
281 self.PlayAction(action_runner) | 271 self.PlayAction(action_runner) |
282 | 272 |
283 | 273 |
284 class Page19(ToughVideoCasesPage): | 274 class Page19(ToughVideoCasesPage): |
285 | 275 |
286 def __init__(self, page_set): | 276 def __init__(self, page_set): |
287 super(Page19, self).__init__( | 277 super(Page19, self).__init__( |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 | 347 |
358 def RunPageInteractions(self, action_runner): | 348 def RunPageInteractions(self, action_runner): |
359 self.SeekBeforeAndAfterPlayhead(action_runner) | 349 self.SeekBeforeAndAfterPlayhead(action_runner) |
360 | 350 |
361 | 351 |
362 class Page25(ToughVideoCasesPage): | 352 class Page25(ToughVideoCasesPage): |
363 | 353 |
364 def __init__(self, page_set): | 354 def __init__(self, page_set): |
365 super(Page25, self).__init__( | 355 super(Page25, self).__init__( |
366 url='file://tough_video_cases/video.html?src=garden2_10s.webm', | 356 url='file://tough_video_cases/video.html?src=garden2_10s.webm', |
367 page_set=page_set) | 357 page_set=page_set, labels=['is_4k']) |
368 | 358 |
369 self.skip_basic_metrics = True | 359 self.skip_basic_metrics = True |
370 self.is_4k = True | |
371 | 360 |
372 def RunPageInteractions(self, action_runner): | 361 def RunPageInteractions(self, action_runner): |
373 self.SeekBeforeAndAfterPlayhead(action_runner) | 362 self.SeekBeforeAndAfterPlayhead(action_runner) |
374 | 363 |
375 | 364 |
376 class Page26(ToughVideoCasesPage): | 365 class Page26(ToughVideoCasesPage): |
377 | 366 |
378 def __init__(self, page_set): | 367 def __init__(self, page_set): |
379 super(Page26, self).__init__( | 368 super(Page26, self).__init__( |
380 url='file://tough_video_cases/video.html?src=garden2_10s.mp4', | 369 url='file://tough_video_cases/video.html?src=garden2_10s.mp4', |
381 page_set=page_set) | 370 page_set=page_set, labels=['is_4k']) |
382 | 371 |
383 self.skip_basic_metrics = True | 372 self.skip_basic_metrics = True |
384 self.is_4k = True | |
385 | 373 |
386 def RunPageInteractions(self, action_runner): | 374 def RunPageInteractions(self, action_runner): |
387 self.SeekBeforeAndAfterPlayhead(action_runner) | 375 self.SeekBeforeAndAfterPlayhead(action_runner) |
388 | 376 |
389 | 377 |
390 class Page27(ToughVideoCasesPage): | 378 class Page27(ToughVideoCasesPage): |
391 | 379 |
392 def __init__(self, page_set): | 380 def __init__(self, page_set): |
393 super(Page27, self).__init__( | 381 super(Page27, self).__init__( |
394 url='file://tough_video_cases/video.html?src=garden2_10s.ogv', | 382 url='file://tough_video_cases/video.html?src=garden2_10s.ogv', |
395 page_set=page_set) | 383 page_set=page_set, labels=['is_4k']) |
396 | 384 |
397 self.skip_basic_metrics = True | 385 self.skip_basic_metrics = True |
398 self.is_4k = True | |
399 | 386 |
400 def RunPageInteractions(self, action_runner): | 387 def RunPageInteractions(self, action_runner): |
401 self.SeekBeforeAndAfterPlayhead(action_runner) | 388 self.SeekBeforeAndAfterPlayhead(action_runner) |
402 | 389 |
403 | 390 |
404 class Page28(ToughVideoCasesPage): | 391 class Page28(ToughVideoCasesPage): |
405 | 392 |
406 def __init__(self, page_set): | 393 def __init__(self, page_set): |
407 super(Page28, self).__init__( | 394 super(Page28, self).__init__( |
408 url='file://tough_video_cases/audio_playback.html?id=single_audio', | 395 url='file://tough_video_cases/audio_playback.html?id=single_audio', |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 self.AddPage(Page26(self)) | 522 self.AddPage(Page26(self)) |
536 self.AddPage(Page27(self)) | 523 self.AddPage(Page27(self)) |
537 self.AddPage(Page28(self)) | 524 self.AddPage(Page28(self)) |
538 self.AddPage(Page29(self)) | 525 self.AddPage(Page29(self)) |
539 self.AddPage(Page30(self)) | 526 self.AddPage(Page30(self)) |
540 self.AddPage(Page31(self)) | 527 self.AddPage(Page31(self)) |
541 self.AddPage(Page32(self)) | 528 self.AddPage(Page32(self)) |
542 self.AddPage(Page33(self)) | 529 self.AddPage(Page33(self)) |
543 self.AddPage(Page34(self)) | 530 self.AddPage(Page34(self)) |
544 self.AddPage(Page35(self)) | 531 self.AddPage(Page35(self)) |
OLD | NEW |