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 = [ | 7 _PAGE_TAGS_LIST = [ |
8 # Audio codecs: | 8 # Audio codecs: |
9 'pcm', | 9 'pcm', |
10 'mp3', | 10 'mp3', |
(...skipping 17 matching lines...) Expand all Loading... |
28 ] | 28 ] |
29 | 29 |
30 | 30 |
31 class ToughVideoCasesPage(page_module.Page): | 31 class ToughVideoCasesPage(page_module.Page): |
32 | 32 |
33 def __init__(self, url, page_set, tags): | 33 def __init__(self, url, page_set, tags): |
34 if tags: | 34 if tags: |
35 for t in tags: | 35 for t in tags: |
36 assert t in _PAGE_TAGS_LIST | 36 assert t in _PAGE_TAGS_LIST |
37 super(ToughVideoCasesPage, self).__init__( | 37 super(ToughVideoCasesPage, self).__init__( |
38 url=url, page_set=page_set, tags=tags) | 38 url=url, page_set=page_set, tags=tags, name=url.split('/')[-1]) |
39 | 39 |
40 def PlayAction(self, action_runner): | 40 def PlayAction(self, action_runner): |
41 # Play the media until it has finished or it times out. | 41 # Play the media until it has finished or it times out. |
42 action_runner.PlayMedia(playing_event_timeout_in_seconds=60, | 42 action_runner.PlayMedia(playing_event_timeout_in_seconds=60, |
43 ended_event_timeout_in_seconds=60) | 43 ended_event_timeout_in_seconds=60) |
44 # Generate memory dump for memoryMetric. | 44 # Generate memory dump for memoryMetric. |
45 if self.page_set.measure_memory: | 45 if self.page_set.measure_memory: |
46 action_runner.MeasureMemory() | 46 action_runner.MeasureMemory() |
47 | 47 |
48 def SeekBeforeAndAfterPlayhead(self, action_runner, | 48 def SeekBeforeAndAfterPlayhead(self, action_runner, |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 action_timeout_in_seconds=120) | 402 action_timeout_in_seconds=120) |
403 | 403 |
404 | 404 |
405 class ToughVideoCasesPageSet(story.StorySet): | 405 class ToughVideoCasesPageSet(story.StorySet): |
406 """ | 406 """ |
407 Description: Video Stack Perf pages that report time_to_play, seek time and | 407 Description: Video Stack Perf pages that report time_to_play, seek time and |
408 many other media-specific and generic metrics. | 408 many other media-specific and generic metrics. |
409 """ | 409 """ |
410 def __init__(self, measure_memory=False): | 410 def __init__(self, measure_memory=False): |
411 super(ToughVideoCasesPageSet, self).__init__( | 411 super(ToughVideoCasesPageSet, self).__init__( |
412 cloud_storage_bucket=story.PARTNER_BUCKET) | 412 cloud_storage_bucket=story.PARTNER_BUCKET, |
| 413 verify_names=True) |
413 | 414 |
414 self.measure_memory = measure_memory | 415 self.measure_memory = measure_memory |
415 | 416 |
416 # Normal play tests: | 417 # Normal play tests: |
417 self.AddStory(Page2(self)) | 418 self.AddStory(Page2(self)) |
418 self.AddStory(Page4(self)) | 419 self.AddStory(Page4(self)) |
419 self.AddStory(Page7(self)) | 420 self.AddStory(Page7(self)) |
420 self.AddStory(Page8(self)) | 421 self.AddStory(Page8(self)) |
421 self.AddStory(Page11(self)) | 422 self.AddStory(Page11(self)) |
422 self.AddStory(Page12(self)) | 423 self.AddStory(Page12(self)) |
(...skipping 10 matching lines...) Expand all Loading... |
433 self.AddStory(Page19(self)) | 434 self.AddStory(Page19(self)) |
434 self.AddStory(Page20(self)) | 435 self.AddStory(Page20(self)) |
435 self.AddStory(Page23(self)) | 436 self.AddStory(Page23(self)) |
436 self.AddStory(Page24(self)) | 437 self.AddStory(Page24(self)) |
437 self.AddStory(Page25(self)) | 438 self.AddStory(Page25(self)) |
438 self.AddStory(Page26(self)) | 439 self.AddStory(Page26(self)) |
439 self.AddStory(Page31(self)) | 440 self.AddStory(Page31(self)) |
440 self.AddStory(Page33(self)) | 441 self.AddStory(Page33(self)) |
441 self.AddStory(Page35(self)) | 442 self.AddStory(Page35(self)) |
442 self.AddStory(Page36(self)) | 443 self.AddStory(Page36(self)) |
OLD | NEW |