Chromium Code Reviews| 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 import story | 5 from telemetry import story |
| 6 | 6 |
| 7 PAGE_TAGS_LIST = [ | |
|
johnchen
2017/04/11 00:50:49
Do we expect other modules to need access to this
CalebRouleau
2017/04/11 01:55:50
Done.
CalebRouleau
2017/04/11 01:55:50
Done.
| |
| 8 # Audio codecs: | |
| 9 'pcm', | |
| 10 'mp3', | |
| 11 'aac', | |
| 12 'vorbis', | |
| 13 # Video codecs: | |
| 14 'theora' | |
| 15 'h264', | |
| 16 'vp8', | |
| 17 'vp9', | |
| 18 # Test types: | |
| 19 'audio_video', | |
| 20 'audio_only', | |
| 21 'video_only', | |
| 22 'looped_audio', | |
| 23 # Other filter tags: | |
| 24 'is_50fps', | |
|
DaleCurtis
2017/04/11 00:08:01
Probably tags like 720p60, 2160p60, etc would be m
CalebRouleau
2017/04/11 00:26:50
Agreed. I'm just organizing stuff up in this CL wi
DaleCurtis
2017/04/11 00:34:08
Depends on if tag filtering is a regex or not. If
CalebRouleau
2017/04/11 01:55:50
Yeah, that's true. I'll look into it further.
| |
| 25 'is_4k', | |
| 26 ] | |
| 27 | |
| 7 | 28 |
| 8 class ToughVideoCasesPage(page_module.Page): | 29 class ToughVideoCasesPage(page_module.Page): |
| 9 | 30 |
| 10 def __init__(self, url, page_set, tags=None): | 31 def __init__(self, url, page_set, tags=None): |
| 32 if tags: | |
|
johnchen
2017/04/11 00:50:49
Probably makes more sense to make tags required no
CalebRouleau
2017/04/11 01:55:50
Done.
| |
| 33 for tag in tags: | |
|
nednguyen
2017/04/11 00:04:02
nits: for t in tags
I usually try to avoid variab
CalebRouleau
2017/04/11 00:26:50
I disagree in general with using single character
nednguyen
2017/04/11 00:40:24
Using single character for counter or iterator is
CalebRouleau
2017/04/11 01:55:50
Just because they say you don't have to avoid it d
| |
| 34 assert tag in PAGE_TAGS_LIST | |
| 11 super(ToughVideoCasesPage, self).__init__( | 35 super(ToughVideoCasesPage, self).__init__( |
| 12 url=url, page_set=page_set, tags=tags) | 36 url=url, page_set=page_set, tags=tags) |
| 13 | 37 |
| 14 def LoopMixedAudio(self, action_runner): | 38 def LoopMixedAudio(self, action_runner): |
| 15 action_runner.PlayMedia(selector='#background_audio', | 39 action_runner.PlayMedia(selector='#background_audio', |
| 16 playing_event_timeout_in_seconds=60) | 40 playing_event_timeout_in_seconds=60) |
| 17 action_runner.LoopMedia(loop_count=50, selector='#mixed_audio') | 41 action_runner.LoopMedia(loop_count=50, selector='#mixed_audio') |
| 18 | 42 |
| 19 def LoopSingleAudio(self, action_runner): | 43 def LoopSingleAudio(self, action_runner): |
| 20 action_runner.LoopMedia(loop_count=50, selector='#single_audio') | 44 action_runner.LoopMedia(loop_count=50, selector='#single_audio') |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 38 # Seek to after the play-head location. | 62 # Seek to after the play-head location. |
| 39 action_runner.SeekMedia(seconds=9, timeout_in_seconds=timeout, | 63 action_runner.SeekMedia(seconds=9, timeout_in_seconds=timeout, |
| 40 label='seek_cold') | 64 label='seek_cold') |
| 41 | 65 |
| 42 | 66 |
| 43 class Page1(ToughVideoCasesPage): | 67 class Page1(ToughVideoCasesPage): |
| 44 | 68 |
| 45 def __init__(self, page_set): | 69 def __init__(self, page_set): |
| 46 super(Page1, self).__init__( | 70 super(Page1, self).__init__( |
| 47 url='file://tough_video_cases/video.html?src=crowd.wav&type=audio', | 71 url='file://tough_video_cases/video.html?src=crowd.wav&type=audio', |
| 48 page_set=page_set) | 72 page_set=page_set, |
| 73 tags=['pcm', 'audio_only']) | |
| 49 | 74 |
| 50 self.add_browser_metrics = True | 75 self.add_browser_metrics = True |
| 51 | 76 |
| 52 def RunPageInteractions(self, action_runner): | 77 def RunPageInteractions(self, action_runner): |
| 53 self.PlayAction(action_runner) | 78 self.PlayAction(action_runner) |
| 54 | 79 |
| 55 | 80 |
| 56 class Page2(ToughVideoCasesPage): | 81 class Page2(ToughVideoCasesPage): |
| 57 | 82 |
| 58 def __init__(self, page_set): | 83 def __init__(self, page_set): |
| 59 super(Page2, self).__init__( | 84 super(Page2, self).__init__( |
| 60 url='file://tough_video_cases/video.html?src=crowd.ogg&type=audio', | 85 url='file://tough_video_cases/video.html?src=crowd.ogg&type=audio', |
| 61 page_set=page_set) | 86 page_set=page_set, |
| 87 tags=['vorbis', 'audio_only']) | |
| 62 | 88 |
| 63 self.add_browser_metrics = True | 89 self.add_browser_metrics = True |
| 64 | 90 |
| 65 def RunPageInteractions(self, action_runner): | 91 def RunPageInteractions(self, action_runner): |
| 66 self.PlayAction(action_runner) | 92 self.PlayAction(action_runner) |
| 67 | 93 |
| 68 | 94 |
| 69 class Page3(ToughVideoCasesPage): | 95 class Page3(ToughVideoCasesPage): |
| 70 | 96 |
| 97 # Note that ffprobe reports about this file: | |
| 98 # "[ogg @ 0x31a3ba0] Broken file, keyframe not correctly marked." | |
| 99 # This media file should probably be removed or replaced. | |
| 71 def __init__(self, page_set): | 100 def __init__(self, page_set): |
| 72 super(Page3, self).__init__( | 101 super(Page3, self).__init__( |
| 73 url='file://tough_video_cases/video.html?src=crowd1080.ogv', | 102 url='file://tough_video_cases/video.html?src=crowd1080.ogv', |
| 74 page_set=page_set) | 103 page_set=page_set, |
| 104 tags=['is_50fps', 'theora', 'vorbis', 'audio_video']) | |
| 75 | 105 |
| 76 self.add_browser_metrics = True | 106 self.add_browser_metrics = True |
| 77 self.is_50fps = True | |
| 78 | 107 |
| 79 def RunPageInteractions(self, action_runner): | 108 def RunPageInteractions(self, action_runner): |
| 80 self.PlayAction(action_runner) | 109 self.PlayAction(action_runner) |
| 81 | 110 |
| 82 | 111 |
| 83 class Page4(ToughVideoCasesPage): | 112 class Page4(ToughVideoCasesPage): |
| 84 | 113 |
| 85 def __init__(self, page_set): | 114 def __init__(self, page_set): |
| 86 super(Page4, self).__init__( | 115 super(Page4, self).__init__( |
| 87 url='file://tough_video_cases/video.html?src=crowd1080.webm', | 116 url='file://tough_video_cases/video.html?src=crowd1080.webm', |
| 88 page_set=page_set, tags=['is_50fps']) | 117 page_set=page_set, |
| 118 tags=['is_50fps', 'vp8', 'vorbis', 'audio_video']) | |
| 89 | 119 |
| 90 self.add_browser_metrics = True | 120 self.add_browser_metrics = True |
| 91 | 121 |
| 92 def RunPageInteractions(self, action_runner): | 122 def RunPageInteractions(self, action_runner): |
| 93 self.PlayAction(action_runner) | 123 self.PlayAction(action_runner) |
| 94 | 124 |
| 95 | 125 |
| 96 class Page5(ToughVideoCasesPage): | 126 class Page5(ToughVideoCasesPage): |
| 97 | 127 |
| 98 def __init__(self, page_set): | 128 def __init__(self, page_set): |
| 99 super(Page5, self).__init__( | 129 super(Page5, self).__init__( |
| 100 url='file://tough_video_cases/video.html?src=crowd2160.ogv', | 130 url='file://tough_video_cases/video.html?src=crowd2160.ogv', |
| 101 page_set=page_set, tags=['is_4k', 'is_50fps']) | 131 page_set=page_set, |
| 132 tags=['is_4k', 'is_50fps', 'theora', 'vorbis', 'audio_video']) | |
| 102 | 133 |
| 103 self.add_browser_metrics = True | 134 self.add_browser_metrics = True |
| 104 | 135 |
| 105 def RunPageInteractions(self, action_runner): | 136 def RunPageInteractions(self, action_runner): |
| 106 self.PlayAction(action_runner) | 137 self.PlayAction(action_runner) |
| 107 | 138 |
| 108 | 139 |
| 109 class Page6(ToughVideoCasesPage): | 140 class Page6(ToughVideoCasesPage): |
| 110 | 141 |
| 111 def __init__(self, page_set): | 142 def __init__(self, page_set): |
| 112 super(Page6, self).__init__( | 143 super(Page6, self).__init__( |
| 113 url='file://tough_video_cases/video.html?src=crowd2160.webm', | 144 url='file://tough_video_cases/video.html?src=crowd2160.webm', |
| 114 page_set=page_set, tags=['is_4k', 'is_50fps']) | 145 page_set=page_set, |
| 146 tags=['is_4k', 'is_50fps', 'vp8', 'vorbis', 'audio_video']) | |
| 115 | 147 |
| 116 self.add_browser_metrics = True | 148 self.add_browser_metrics = True |
| 117 | 149 |
| 118 def RunPageInteractions(self, action_runner): | 150 def RunPageInteractions(self, action_runner): |
| 119 self.PlayAction(action_runner) | 151 self.PlayAction(action_runner) |
| 120 | 152 |
| 121 | 153 |
| 122 class Page7(ToughVideoCasesPage): | 154 class Page7(ToughVideoCasesPage): |
| 123 | 155 |
| 124 def __init__(self, page_set): | 156 def __init__(self, page_set): |
| 125 super(Page7, self).__init__( | 157 super(Page7, self).__init__( |
| 126 url='file://tough_video_cases/video.html?src=tulip2.ogg&type=audio', | 158 url='file://tough_video_cases/video.html?src=tulip2.ogg&type=audio', |
| 127 page_set=page_set) | 159 page_set=page_set, |
| 160 tags=['vorbis', 'audio_only']) | |
| 128 | 161 |
| 129 self.add_browser_metrics = True | 162 self.add_browser_metrics = True |
| 130 | 163 |
| 131 def RunPageInteractions(self, action_runner): | 164 def RunPageInteractions(self, action_runner): |
| 132 self.PlayAction(action_runner) | 165 self.PlayAction(action_runner) |
| 133 | 166 |
| 134 | 167 |
| 135 class Page8(ToughVideoCasesPage): | 168 class Page8(ToughVideoCasesPage): |
| 136 | 169 |
| 137 def __init__(self, page_set): | 170 def __init__(self, page_set): |
| 138 super(Page8, self).__init__( | 171 super(Page8, self).__init__( |
| 139 url='file://tough_video_cases/video.html?src=tulip2.wav&type=audio', | 172 url='file://tough_video_cases/video.html?src=tulip2.wav&type=audio', |
| 140 page_set=page_set) | 173 page_set=page_set, |
| 174 tags=['pcm', 'audio_only']) | |
| 141 | 175 |
| 142 self.add_browser_metrics = True | 176 self.add_browser_metrics = True |
| 143 | 177 |
| 144 def RunPageInteractions(self, action_runner): | 178 def RunPageInteractions(self, action_runner): |
| 145 self.PlayAction(action_runner) | 179 self.PlayAction(action_runner) |
| 146 | 180 |
| 147 | 181 |
| 148 class Page9(ToughVideoCasesPage): | 182 class Page9(ToughVideoCasesPage): |
| 149 | 183 |
| 150 def __init__(self, page_set): | 184 def __init__(self, page_set): |
| 151 super(Page9, self).__init__( | 185 super(Page9, self).__init__( |
| 152 url='file://tough_video_cases/video.html?src=tulip2.ogv', | 186 url='file://tough_video_cases/video.html?src=tulip2.ogv', |
| 153 page_set=page_set) | 187 page_set=page_set, |
| 188 tags=['theora', 'vorbis', 'audio_video']) | |
| 154 | 189 |
| 155 self.add_browser_metrics = True | 190 self.add_browser_metrics = True |
| 156 | 191 |
| 157 def RunPageInteractions(self, action_runner): | 192 def RunPageInteractions(self, action_runner): |
| 158 self.PlayAction(action_runner) | 193 self.PlayAction(action_runner) |
| 159 | 194 |
| 160 | 195 |
| 161 class Page10(ToughVideoCasesPage): | 196 class Page10(ToughVideoCasesPage): |
| 162 | 197 |
| 163 def __init__(self, page_set): | 198 def __init__(self, page_set): |
| 164 super(Page10, self).__init__( | 199 super(Page10, self).__init__( |
| 165 url='file://tough_video_cases/video.html?src=tulip2.webm', | 200 url='file://tough_video_cases/video.html?src=tulip2.webm', |
| 166 page_set=page_set) | 201 page_set=page_set, |
| 202 tags=['vp8', 'vorbis', 'audio_video']) | |
| 167 | 203 |
| 168 self.add_browser_metrics = True | 204 self.add_browser_metrics = True |
| 169 | 205 |
| 170 def RunPageInteractions(self, action_runner): | 206 def RunPageInteractions(self, action_runner): |
| 171 self.PlayAction(action_runner) | 207 self.PlayAction(action_runner) |
| 172 | 208 |
| 173 | 209 |
| 174 class Page11(ToughVideoCasesPage): | 210 class Page11(ToughVideoCasesPage): |
| 175 | 211 |
| 176 def __init__(self, page_set): | 212 def __init__(self, page_set): |
| 177 super(Page11, self).__init__( | 213 super(Page11, self).__init__( |
| 178 url='file://tough_video_cases/video.html?src=crowd1080.mp4', | 214 url='file://tough_video_cases/video.html?src=crowd1080.mp4', |
| 179 page_set=page_set, tags=['is_50fps']) | 215 page_set=page_set, |
| 216 tags=['is_50fps', 'h264', 'aac', 'audio_video']) | |
| 180 | 217 |
| 181 self.add_browser_metrics = True | 218 self.add_browser_metrics = True |
| 182 | 219 |
| 183 def RunPageInteractions(self, action_runner): | 220 def RunPageInteractions(self, action_runner): |
| 184 self.PlayAction(action_runner) | 221 self.PlayAction(action_runner) |
| 185 | 222 |
| 186 | 223 |
| 187 class Page12(ToughVideoCasesPage): | 224 class Page12(ToughVideoCasesPage): |
| 188 | 225 |
| 189 def __init__(self, page_set): | 226 def __init__(self, page_set): |
| 190 super(Page12, self).__init__( | 227 super(Page12, self).__init__( |
| 191 url='file://tough_video_cases/video.html?src=crowd2160.mp4', | 228 url='file://tough_video_cases/video.html?src=crowd2160.mp4', |
| 192 page_set=page_set, tags=['is_4k', 'is_50fps']) | 229 page_set=page_set, |
| 230 tags=['is_4k', 'is_50fps', 'h264', 'aac', 'audio_video']) | |
| 193 | 231 |
| 194 self.add_browser_metrics = True | 232 self.add_browser_metrics = True |
| 195 | 233 |
| 196 def RunPageInteractions(self, action_runner): | 234 def RunPageInteractions(self, action_runner): |
| 197 self.PlayAction(action_runner) | 235 self.PlayAction(action_runner) |
| 198 | 236 |
| 199 | 237 |
| 200 class Page13(ToughVideoCasesPage): | 238 class Page13(ToughVideoCasesPage): |
| 201 | 239 |
| 202 def __init__(self, page_set): | 240 def __init__(self, page_set): |
| 203 super(Page13, self).__init__( | 241 super(Page13, self).__init__( |
| 204 url='file://tough_video_cases/video.html?src=tulip2.mp3&type=audio', | 242 url='file://tough_video_cases/video.html?src=tulip2.mp3&type=audio', |
| 205 page_set=page_set) | 243 page_set=page_set, |
| 244 tags=['mp3', 'audio_only']) | |
| 206 | 245 |
| 207 self.add_browser_metrics = True | 246 self.add_browser_metrics = True |
| 208 | 247 |
| 209 def RunPageInteractions(self, action_runner): | 248 def RunPageInteractions(self, action_runner): |
| 210 self.PlayAction(action_runner) | 249 self.PlayAction(action_runner) |
| 211 | 250 |
| 212 | 251 |
| 213 class Page14(ToughVideoCasesPage): | 252 class Page14(ToughVideoCasesPage): |
| 214 | 253 |
| 215 def __init__(self, page_set): | 254 def __init__(self, page_set): |
| 216 super(Page14, self).__init__( | 255 super(Page14, self).__init__( |
| 217 url='file://tough_video_cases/video.html?src=tulip2.mp4', | 256 url='file://tough_video_cases/video.html?src=tulip2.mp4', |
| 218 page_set=page_set) | 257 page_set=page_set, |
| 258 tags=['h264', 'aac', 'audio_video']) | |
| 219 | 259 |
| 220 self.add_browser_metrics = True | 260 self.add_browser_metrics = True |
| 221 | 261 |
| 222 def RunPageInteractions(self, action_runner): | 262 def RunPageInteractions(self, action_runner): |
| 223 self.PlayAction(action_runner) | 263 self.PlayAction(action_runner) |
| 224 | 264 |
| 225 | 265 |
| 226 class Page15(ToughVideoCasesPage): | 266 class Page15(ToughVideoCasesPage): |
| 227 | 267 |
| 228 def __init__(self, page_set): | 268 def __init__(self, page_set): |
| 229 super(Page15, self).__init__( | 269 super(Page15, self).__init__( |
| 230 url='file://tough_video_cases/video.html?src=tulip2.m4a&type=audio', | 270 url='file://tough_video_cases/video.html?src=tulip2.m4a&type=audio', |
| 231 page_set=page_set) | 271 page_set=page_set, |
| 272 tags=['aac', 'audio_only']) | |
| 232 | 273 |
| 233 self.add_browser_metrics = True | 274 self.add_browser_metrics = True |
| 234 | 275 |
| 235 def RunPageInteractions(self, action_runner): | 276 def RunPageInteractions(self, action_runner): |
| 236 self.PlayAction(action_runner) | 277 self.PlayAction(action_runner) |
| 237 | 278 |
| 238 | 279 |
| 239 class Page16(ToughVideoCasesPage): | 280 class Page16(ToughVideoCasesPage): |
| 240 | 281 |
| 241 def __init__(self, page_set): | 282 def __init__(self, page_set): |
| 242 super(Page16, self).__init__( | 283 super(Page16, self).__init__( |
| 243 url='file://tough_video_cases/video.html?src=garden2_10s.webm', | 284 url='file://tough_video_cases/video.html?src=garden2_10s.webm', |
| 244 page_set=page_set, tags=['is_4k']) | 285 page_set=page_set, |
| 286 tags=['is_4k', 'vp8', 'vorbis', 'audio_video']) | |
| 245 | 287 |
| 246 self.add_browser_metrics = True | 288 self.add_browser_metrics = True |
| 247 | 289 |
| 248 def RunPageInteractions(self, action_runner): | 290 def RunPageInteractions(self, action_runner): |
| 249 self.PlayAction(action_runner) | 291 self.PlayAction(action_runner) |
| 250 | 292 |
| 251 | 293 |
| 252 class Page17(ToughVideoCasesPage): | 294 class Page17(ToughVideoCasesPage): |
| 253 | 295 |
| 254 def __init__(self, page_set): | 296 def __init__(self, page_set): |
| 255 super(Page17, self).__init__( | 297 super(Page17, self).__init__( |
| 256 url='file://tough_video_cases/video.html?src=garden2_10s.mp4', | 298 url='file://tough_video_cases/video.html?src=garden2_10s.mp4', |
| 257 page_set=page_set, tags=['is_4k']) | 299 page_set=page_set, |
| 300 tags=['is_4k', 'h264', 'aac', 'audio_video']) | |
| 258 | 301 |
| 259 self.add_browser_metrics = True | 302 self.add_browser_metrics = True |
| 260 | 303 |
| 261 def RunPageInteractions(self, action_runner): | 304 def RunPageInteractions(self, action_runner): |
| 262 self.PlayAction(action_runner) | 305 self.PlayAction(action_runner) |
| 263 | 306 |
| 264 | 307 |
| 265 class Page18(ToughVideoCasesPage): | 308 class Page18(ToughVideoCasesPage): |
| 266 | 309 |
| 267 def __init__(self, page_set): | 310 def __init__(self, page_set): |
| 268 super(Page18, self).__init__( | 311 super(Page18, self).__init__( |
| 269 url='file://tough_video_cases/video.html?src=garden2_10s.ogv', | 312 url='file://tough_video_cases/video.html?src=garden2_10s.ogv', |
| 270 page_set=page_set, tags=['is_4k']) | 313 page_set=page_set, |
| 314 tags=['is_4k', 'theora', 'vorbis', 'audio_video']) | |
| 271 | 315 |
| 272 self.add_browser_metrics = True | 316 self.add_browser_metrics = True |
| 273 | 317 |
| 274 def RunPageInteractions(self, action_runner): | 318 def RunPageInteractions(self, action_runner): |
| 275 self.PlayAction(action_runner) | 319 self.PlayAction(action_runner) |
| 276 | 320 |
| 277 | 321 |
| 278 class Page19(ToughVideoCasesPage): | 322 class Page19(ToughVideoCasesPage): |
| 279 | 323 |
| 280 def __init__(self, page_set): | 324 def __init__(self, page_set): |
| 281 super(Page19, self).__init__( | 325 super(Page19, self).__init__( |
| 282 url='file://tough_video_cases/video.html?src=tulip2.ogg&type=audio', | 326 url='file://tough_video_cases/video.html?src=tulip2.ogg&type=audio', |
| 283 page_set=page_set) | 327 page_set=page_set, |
| 328 tags=['vorbis', 'audio']) | |
| 284 | 329 |
| 285 self.skip_basic_metrics = True | 330 self.skip_basic_metrics = True |
| 286 | 331 |
| 287 def RunPageInteractions(self, action_runner): | 332 def RunPageInteractions(self, action_runner): |
| 288 self.SeekBeforeAndAfterPlayhead(action_runner) | 333 self.SeekBeforeAndAfterPlayhead(action_runner) |
| 289 | 334 |
| 290 | 335 |
| 291 class Page20(ToughVideoCasesPage): | 336 class Page20(ToughVideoCasesPage): |
| 292 | 337 |
| 293 def __init__(self, page_set): | 338 def __init__(self, page_set): |
| 294 super(Page20, self).__init__( | 339 super(Page20, self).__init__( |
| 295 url='file://tough_video_cases/video.html?src=tulip2.wav&type=audio', | 340 url='file://tough_video_cases/video.html?src=tulip2.wav&type=audio', |
| 296 page_set=page_set) | 341 page_set=page_set, |
| 342 tags=['pcm', 'audio_only']) | |
| 297 | 343 |
| 298 self.skip_basic_metrics = True | 344 self.skip_basic_metrics = True |
| 299 | 345 |
| 300 def RunPageInteractions(self, action_runner): | 346 def RunPageInteractions(self, action_runner): |
| 301 self.SeekBeforeAndAfterPlayhead(action_runner) | 347 self.SeekBeforeAndAfterPlayhead(action_runner) |
| 302 | 348 |
| 303 | 349 |
| 304 class Page21(ToughVideoCasesPage): | 350 class Page21(ToughVideoCasesPage): |
| 305 | 351 |
| 352 # Note that ffprobe reports about this file: | |
| 353 # "[ogg @ 0x39adba0] Broken file, keyframe not correctly marked." | |
| 354 # This media file should probably be removed or replaced. | |
| 306 def __init__(self, page_set): | 355 def __init__(self, page_set): |
| 307 super(Page21, self).__init__( | 356 super(Page21, self).__init__( |
| 308 url='file://tough_video_cases/video.html?src=tulip2.ogv', | 357 url='file://tough_video_cases/video.html?src=tulip2.ogv', |
| 309 page_set=page_set) | 358 page_set=page_set, |
| 359 tags=['theora', 'vorbis', 'audio_video']) | |
| 310 | 360 |
| 311 self.skip_basic_metrics = True | 361 self.skip_basic_metrics = True |
| 312 | 362 |
| 313 def RunPageInteractions(self, action_runner): | 363 def RunPageInteractions(self, action_runner): |
| 314 self.SeekBeforeAndAfterPlayhead(action_runner) | 364 self.SeekBeforeAndAfterPlayhead(action_runner) |
| 315 | 365 |
| 316 | 366 |
| 317 class Page22(ToughVideoCasesPage): | 367 class Page22(ToughVideoCasesPage): |
| 318 | 368 |
| 319 def __init__(self, page_set): | 369 def __init__(self, page_set): |
| 320 super(Page22, self).__init__( | 370 super(Page22, self).__init__( |
| 321 url='file://tough_video_cases/video.html?src=tulip2.webm', | 371 url='file://tough_video_cases/video.html?src=tulip2.webm', |
| 322 page_set=page_set) | 372 page_set=page_set, |
| 373 tags=['vp8', 'vorbis', 'audio_video']) | |
| 323 | 374 |
| 324 self.skip_basic_metrics = True | 375 self.skip_basic_metrics = True |
| 325 | 376 |
| 326 def RunPageInteractions(self, action_runner): | 377 def RunPageInteractions(self, action_runner): |
| 327 self.SeekBeforeAndAfterPlayhead(action_runner) | 378 self.SeekBeforeAndAfterPlayhead(action_runner) |
| 328 | 379 |
| 329 | 380 |
| 330 class Page23(ToughVideoCasesPage): | 381 class Page23(ToughVideoCasesPage): |
| 331 | 382 |
| 332 def __init__(self, page_set): | 383 def __init__(self, page_set): |
| 333 super(Page23, self).__init__( | 384 super(Page23, self).__init__( |
| 334 url='file://tough_video_cases/video.html?src=tulip2.mp3&type=audio', | 385 url='file://tough_video_cases/video.html?src=tulip2.mp3&type=audio', |
| 335 page_set=page_set) | 386 page_set=page_set, |
| 387 tags=['mp3', 'audio_only']) | |
| 336 | 388 |
| 337 self.skip_basic_metrics = True | 389 self.skip_basic_metrics = True |
| 338 | 390 |
| 339 def RunPageInteractions(self, action_runner): | 391 def RunPageInteractions(self, action_runner): |
| 340 self.SeekBeforeAndAfterPlayhead(action_runner) | 392 self.SeekBeforeAndAfterPlayhead(action_runner) |
| 341 | 393 |
| 342 | 394 |
| 343 class Page24(ToughVideoCasesPage): | 395 class Page24(ToughVideoCasesPage): |
| 344 | 396 |
| 345 def __init__(self, page_set): | 397 def __init__(self, page_set): |
| 346 super(Page24, self).__init__( | 398 super(Page24, self).__init__( |
| 347 url='file://tough_video_cases/video.html?src=tulip2.mp4', | 399 url='file://tough_video_cases/video.html?src=tulip2.mp4', |
| 348 page_set=page_set) | 400 page_set=page_set, |
| 401 tags=['h264', 'aac', 'audio_video']) | |
| 349 | 402 |
| 350 self.skip_basic_metrics = True | 403 self.skip_basic_metrics = True |
| 351 | 404 |
| 352 def RunPageInteractions(self, action_runner): | 405 def RunPageInteractions(self, action_runner): |
| 353 self.SeekBeforeAndAfterPlayhead(action_runner) | 406 self.SeekBeforeAndAfterPlayhead(action_runner) |
| 354 | 407 |
| 355 | 408 |
| 356 class Page25(ToughVideoCasesPage): | 409 class Page25(ToughVideoCasesPage): |
| 357 | 410 |
| 358 def __init__(self, page_set): | 411 def __init__(self, page_set): |
| 359 super(Page25, self).__init__( | 412 super(Page25, self).__init__( |
| 360 url='file://tough_video_cases/video.html?src=garden2_10s.webm', | 413 url='file://tough_video_cases/video.html?src=garden2_10s.webm', |
| 361 page_set=page_set, tags=['is_4k']) | 414 page_set=page_set, |
| 415 tags=['is_4k', 'vp8', 'vorbis', 'audio_video']) | |
| 362 | 416 |
| 363 self.skip_basic_metrics = True | 417 self.skip_basic_metrics = True |
| 364 | 418 |
| 365 def RunPageInteractions(self, action_runner): | 419 def RunPageInteractions(self, action_runner): |
| 366 self.SeekBeforeAndAfterPlayhead(action_runner) | 420 self.SeekBeforeAndAfterPlayhead(action_runner) |
| 367 | 421 |
| 368 | 422 |
| 369 class Page26(ToughVideoCasesPage): | 423 class Page26(ToughVideoCasesPage): |
| 370 | 424 |
| 371 def __init__(self, page_set): | 425 def __init__(self, page_set): |
| 372 super(Page26, self).__init__( | 426 super(Page26, self).__init__( |
| 373 url='file://tough_video_cases/video.html?src=garden2_10s.mp4', | 427 url='file://tough_video_cases/video.html?src=garden2_10s.mp4', |
| 374 page_set=page_set, tags=['is_4k']) | 428 page_set=page_set, |
| 429 tags=['is_4k', 'h264', 'aac', 'audio_video']) | |
| 375 | 430 |
| 376 self.skip_basic_metrics = True | 431 self.skip_basic_metrics = True |
| 377 | 432 |
| 378 def RunPageInteractions(self, action_runner): | 433 def RunPageInteractions(self, action_runner): |
| 379 self.SeekBeforeAndAfterPlayhead(action_runner) | 434 self.SeekBeforeAndAfterPlayhead(action_runner) |
| 380 | 435 |
| 381 | 436 |
| 382 class Page27(ToughVideoCasesPage): | 437 class Page27(ToughVideoCasesPage): |
| 383 | 438 |
| 384 def __init__(self, page_set): | 439 def __init__(self, page_set): |
| 385 super(Page27, self).__init__( | 440 super(Page27, self).__init__( |
| 386 url='file://tough_video_cases/video.html?src=garden2_10s.ogv', | 441 url='file://tough_video_cases/video.html?src=garden2_10s.ogv', |
| 387 page_set=page_set, tags=['is_4k']) | 442 page_set=page_set, |
| 443 tags=['is_4k', 'theora', 'vorbis', 'audio_video']) | |
| 388 | 444 |
| 389 self.skip_basic_metrics = True | 445 self.skip_basic_metrics = True |
| 390 | 446 |
| 391 def RunPageInteractions(self, action_runner): | 447 def RunPageInteractions(self, action_runner): |
| 392 self.SeekBeforeAndAfterPlayhead(action_runner) | 448 self.SeekBeforeAndAfterPlayhead(action_runner) |
| 393 | 449 |
| 394 | 450 |
| 395 class Page28(ToughVideoCasesPage): | 451 class Page28(ToughVideoCasesPage): |
| 396 | 452 |
| 453 # This page tests looping a single audio track. | |
| 397 def __init__(self, page_set): | 454 def __init__(self, page_set): |
| 398 super(Page28, self).__init__( | 455 super(Page28, self).__init__( |
| 399 url='file://tough_video_cases/audio_playback.html?id=single_audio', | 456 url='file://tough_video_cases/audio_playback.html?id=single_audio', |
| 400 page_set=page_set) | 457 page_set=page_set, |
| 458 tags=['pcm', 'looping_audio']) | |
| 401 | 459 |
| 402 self.skip_basic_metrics = True | 460 self.skip_basic_metrics = True |
| 403 | 461 |
| 404 def RunPageInteractions(self, action_runner): | 462 def RunPageInteractions(self, action_runner): |
| 405 self.LoopSingleAudio(action_runner) | 463 self.LoopSingleAudio(action_runner) |
| 406 | 464 |
| 407 | 465 |
| 408 class Page29(ToughVideoCasesPage): | 466 class Page29(ToughVideoCasesPage): |
| 409 | 467 |
| 468 # This page tests looping an audio track and playing another in the | |
| 469 # background. | |
| 410 def __init__(self, page_set): | 470 def __init__(self, page_set): |
| 411 super(Page29, self).__init__( | 471 super(Page29, self).__init__( |
| 412 url='file://tough_video_cases/audio_playback.html?id=mixed_audio', | 472 url='file://tough_video_cases/audio_playback.html?id=mixed_audio', |
| 413 page_set=page_set) | 473 page_set=page_set, |
| 474 tags=['pcm', 'looping_audio']) | |
| 414 | 475 |
| 415 self.skip_basic_metrics = True | 476 self.skip_basic_metrics = True |
| 416 | 477 |
| 417 def RunPageInteractions(self, action_runner): | 478 def RunPageInteractions(self, action_runner): |
| 418 self.LoopMixedAudio(action_runner) | 479 self.LoopMixedAudio(action_runner) |
| 419 | 480 |
| 420 class Page30(ToughVideoCasesPage): | 481 class Page30(ToughVideoCasesPage): |
| 421 | 482 |
| 422 def __init__(self, page_set): | 483 def __init__(self, page_set): |
| 423 super(Page30, self).__init__( | 484 super(Page30, self).__init__( |
| 424 url='file://tough_video_cases/video.html?src=tulip2.vp9.webm', | 485 url='file://tough_video_cases/video.html?src=tulip2.vp9.webm', |
| 425 page_set=page_set) | 486 page_set=page_set, |
| 487 tags=['vp9', 'opus', 'audio_video']) | |
| 426 | 488 |
| 427 self.add_browser_metrics = True | 489 self.add_browser_metrics = True |
| 428 | 490 |
| 429 def RunPageInteractions(self, action_runner): | 491 def RunPageInteractions(self, action_runner): |
| 430 self.PlayAction(action_runner) | 492 self.PlayAction(action_runner) |
| 431 | 493 |
| 432 class Page31(ToughVideoCasesPage): | 494 class Page31(ToughVideoCasesPage): |
| 433 | 495 |
| 434 def __init__(self, page_set): | 496 def __init__(self, page_set): |
| 435 super(Page31, self).__init__( | 497 super(Page31, self).__init__( |
| 436 url='file://tough_video_cases/video.html?src=tulip2.vp9.webm', | 498 url='file://tough_video_cases/video.html?src=tulip2.vp9.webm', |
| 437 page_set=page_set) | 499 page_set=page_set, |
| 500 tags=['vp9', 'opus', 'audio_video']) | |
| 438 | 501 |
| 439 self.skip_basic_metrics = True | 502 self.skip_basic_metrics = True |
| 440 | 503 |
| 441 def RunPageInteractions(self, action_runner): | 504 def RunPageInteractions(self, action_runner): |
| 442 self.SeekBeforeAndAfterPlayhead(action_runner) | 505 self.SeekBeforeAndAfterPlayhead(action_runner) |
| 443 | 506 |
| 444 class Page32(ToughVideoCasesPage): | 507 class Page32(ToughVideoCasesPage): |
| 445 | 508 |
| 446 def __init__(self, page_set): | 509 def __init__(self, page_set): |
| 447 super(Page32, self).__init__( | 510 super(Page32, self).__init__( |
| 448 url='file://tough_video_cases/video.html?src=crowd1080_vp9.webm', | 511 url='file://tough_video_cases/video.html?src=crowd1080_vp9.webm', |
| 449 page_set=page_set) | 512 page_set=page_set, |
| 513 tags=['vp9', 'video_only']) | |
| 450 | 514 |
| 451 self.add_browser_metrics = True | 515 self.add_browser_metrics = True |
| 452 | 516 |
| 453 def RunPageInteractions(self, action_runner): | 517 def RunPageInteractions(self, action_runner): |
| 454 self.PlayAction(action_runner) | 518 self.PlayAction(action_runner) |
| 455 | 519 |
| 456 class Page33(ToughVideoCasesPage): | 520 class Page33(ToughVideoCasesPage): |
| 457 | 521 |
| 458 def __init__(self, page_set): | 522 def __init__(self, page_set): |
| 459 super(Page33, self).__init__( | 523 super(Page33, self).__init__( |
| 460 url='file://tough_video_cases/video.html?src=crowd1080_vp9.webm', | 524 url='file://tough_video_cases/video.html?src=crowd1080_vp9.webm', |
| 461 page_set=page_set) | 525 page_set=page_set, |
| 526 tags=['vp9', 'video_only']) | |
| 462 | 527 |
| 463 self.skip_basic_metrics = True | 528 self.skip_basic_metrics = True |
| 464 | 529 |
| 465 def RunPageInteractions(self, action_runner): | 530 def RunPageInteractions(self, action_runner): |
| 466 self.SeekBeforeAndAfterPlayhead(action_runner) | 531 self.SeekBeforeAndAfterPlayhead(action_runner) |
| 467 | 532 |
| 468 class Page34(ToughVideoCasesPage): | 533 class Page34(ToughVideoCasesPage): |
| 469 | 534 |
| 470 def __init__(self, page_set): | 535 def __init__(self, page_set): |
| 471 super(Page34, self).__init__( | 536 super(Page34, self).__init__( |
| 472 url='file://tough_video_cases/video.html?src=crowd720_vp9.webm', | 537 url='file://tough_video_cases/video.html?src=crowd720_vp9.webm', |
| 473 page_set=page_set) | 538 page_set=page_set, |
| 539 tags=['vp9', 'video_only']) | |
| 474 | 540 |
| 475 self.add_browser_metrics = True | 541 self.add_browser_metrics = True |
| 476 | 542 |
| 477 def RunPageInteractions(self, action_runner): | 543 def RunPageInteractions(self, action_runner): |
| 478 self.PlayAction(action_runner) | 544 self.PlayAction(action_runner) |
| 479 | 545 |
| 480 class Page35(ToughVideoCasesPage): | 546 class Page35(ToughVideoCasesPage): |
| 481 | 547 |
| 482 def __init__(self, page_set): | 548 def __init__(self, page_set): |
| 483 super(Page35, self).__init__( | 549 super(Page35, self).__init__( |
| 484 url='file://tough_video_cases/video.html?src=crowd720_vp9.webm', | 550 url='file://tough_video_cases/video.html?src=crowd720_vp9.webm', |
| 485 page_set=page_set) | 551 page_set=page_set, |
| 552 tags=['vp9', 'video_only']) | |
| 486 | 553 |
| 487 self.skip_basic_metrics = True | 554 self.skip_basic_metrics = True |
| 488 | 555 |
| 489 def RunPageInteractions(self, action_runner): | 556 def RunPageInteractions(self, action_runner): |
| 490 self.SeekBeforeAndAfterPlayhead(action_runner) | 557 self.SeekBeforeAndAfterPlayhead(action_runner) |
| 491 | 558 |
| 492 class Page36(ToughVideoCasesPage): | 559 class Page36(ToughVideoCasesPage): |
| 493 | 560 |
| 494 def __init__(self, page_set): | 561 def __init__(self, page_set): |
| 495 super(Page36, self).__init__( | 562 super(Page36, self).__init__( |
| 496 url=('file://tough_video_cases/video.html?src=' | 563 url=('file://tough_video_cases/video.html?src=' |
| 497 'smpte_3840x2160_60fps_vp9.webm'), | 564 'smpte_3840x2160_60fps_vp9.webm'), |
| 498 page_set=page_set, tags=['is_4k']) | 565 page_set=page_set, |
| 566 tags=['is_4k', 'vp9', 'video_only']) | |
| 499 | 567 |
| 500 self.add_browser_metrics = True | 568 self.add_browser_metrics = True |
| 501 | 569 |
| 502 def RunPageInteractions(self, action_runner): | 570 def RunPageInteractions(self, action_runner): |
| 503 self.SeekBeforeAndAfterPlayhead(action_runner, | 571 self.SeekBeforeAndAfterPlayhead(action_runner, |
| 504 action_timeout_in_seconds=120) | 572 action_timeout_in_seconds=120) |
| 505 | 573 |
| 506 class Page37(ToughVideoCasesPage): | 574 class Page37(ToughVideoCasesPage): |
| 507 | 575 |
| 508 def __init__(self, page_set): | 576 def __init__(self, page_set): |
| 509 super(Page37, self).__init__( | 577 super(Page37, self).__init__( |
| 510 url='file://tough_video_cases/video.html?src=crowd1080_vp9.webm&canvas=tru e', | 578 url='file://tough_video_cases/video.html?src=crowd1080_vp9.webm&canvas=tru e', |
| 511 page_set=page_set) | 579 page_set=page_set, |
| 580 tags=['vp9', 'video_only']) | |
| 512 | 581 |
| 513 self.add_browser_metrics = True | 582 self.add_browser_metrics = True |
| 514 | 583 |
| 515 def RunPageInteractions(self, action_runner): | 584 def RunPageInteractions(self, action_runner): |
| 516 self.PlayAction(action_runner) | 585 self.PlayAction(action_runner) |
| 517 | 586 |
| 518 class Page38(ToughVideoCasesPage): | 587 class Page38(ToughVideoCasesPage): |
| 519 | 588 |
| 520 def __init__(self, page_set): | 589 def __init__(self, page_set): |
| 521 super(Page38, self).__init__( | 590 super(Page38, self).__init__( |
| 522 url='file://tough_video_cases/video.html?src=tulip2.mp4&canvas=true', | 591 url='file://tough_video_cases/video.html?src=tulip2.mp4&canvas=true', |
| 523 page_set=page_set) | 592 page_set=page_set, |
| 593 tags=['h264', 'aac', 'audio_video']) | |
| 524 | 594 |
| 525 self.add_browser_metrics = True | 595 self.add_browser_metrics = True |
| 526 | 596 |
| 527 def RunPageInteractions(self, action_runner): | 597 def RunPageInteractions(self, action_runner): |
| 528 self.SeekBeforeAndAfterPlayhead(action_runner) | 598 self.SeekBeforeAndAfterPlayhead(action_runner) |
| 529 | 599 |
| 530 class Page39(ToughVideoCasesPage): | 600 class Page39(ToughVideoCasesPage): |
| 531 | 601 |
| 532 def __init__(self, page_set): | 602 def __init__(self, page_set): |
| 533 super(Page39, self).__init__( | 603 super(Page39, self).__init__( |
| 534 url='file://tough_video_cases/video.html?src=garden2_10s.webm&canvas=true' , | 604 url='file://tough_video_cases/video.html?src=garden2_10s.webm&canvas=true' , |
| 535 page_set=page_set, tags=['is_4k']) | 605 page_set=page_set, |
| 606 tags=['is_4k', 'vp8', 'vorbis', 'audio_video']) | |
| 536 | 607 |
| 537 self.add_browser_metrics = True | 608 self.add_browser_metrics = True |
| 538 | 609 |
| 539 def RunPageInteractions(self, action_runner): | 610 def RunPageInteractions(self, action_runner): |
| 540 self.PlayAction(action_runner) | 611 self.PlayAction(action_runner) |
| 541 | 612 |
| 542 class Page40(ToughVideoCasesPage): | 613 class Page40(ToughVideoCasesPage): |
| 543 | 614 |
| 615 # Note that ffprobe reports about this file: | |
| 616 # "[ogg @ 0x31a3ba0] Broken file, keyframe not correctly marked." | |
| 617 # This media file should probably be removed or replaced. | |
| 544 def __init__(self, page_set): | 618 def __init__(self, page_set): |
| 545 super(Page40, self).__init__( | 619 super(Page40, self).__init__( |
| 546 url='file://tough_video_cases/video.html?src=crowd1080.ogv&canvas=true', | 620 url='file://tough_video_cases/video.html?src=crowd1080.ogv&canvas=true', |
| 547 page_set=page_set) | 621 page_set=page_set, |
| 622 tags=['is_50fps', 'theora', 'vorbis', 'audio_video']) | |
| 548 | 623 |
| 549 self.add_browser_metrics = True | 624 self.add_browser_metrics = True |
| 550 self.is_50fps = True | |
| 551 | 625 |
| 552 def RunPageInteractions(self, action_runner): | 626 def RunPageInteractions(self, action_runner): |
| 553 self.PlayAction(action_runner) | 627 self.PlayAction(action_runner) |
| 554 | 628 |
| 555 class ToughVideoCasesPageSet(story.StorySet): | 629 class ToughVideoCasesPageSet(story.StorySet): |
| 556 """ | 630 """ |
| 557 Description: Video Stack Perf benchmark that report time_to_play. | 631 Description: Video Stack Perf benchmark that report time_to_play. |
| 558 """ | 632 """ |
| 559 def __init__(self): | 633 def __init__(self): |
| 560 super(ToughVideoCasesPageSet, self).__init__( | 634 super(ToughVideoCasesPageSet, self).__init__( |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 603 self.AddStory(Page23(self)) | 677 self.AddStory(Page23(self)) |
| 604 self.AddStory(Page24(self)) | 678 self.AddStory(Page24(self)) |
| 605 self.AddStory(Page25(self)) | 679 self.AddStory(Page25(self)) |
| 606 self.AddStory(Page26(self)) | 680 self.AddStory(Page26(self)) |
| 607 self.AddStory(Page27(self)) | 681 self.AddStory(Page27(self)) |
| 608 self.AddStory(Page28(self)) | 682 self.AddStory(Page28(self)) |
| 609 self.AddStory(Page29(self)) | 683 self.AddStory(Page29(self)) |
| 610 self.AddStory(Page31(self)) | 684 self.AddStory(Page31(self)) |
| 611 self.AddStory(Page33(self)) | 685 self.AddStory(Page33(self)) |
| 612 self.AddStory(Page35(self)) | 686 self.AddStory(Page35(self)) |
| OLD | NEW |