Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(513)

Side by Side Diff: tools/perf/page_sets/tough_video_cases.py

Issue 2923543002: Explicitly setting names for media story sets (Closed)
Patch Set: Explicitly setting names for media story sets Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/perf/page_sets/mse_cases.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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))
OLDNEW
« no previous file with comments | « tools/perf/page_sets/mse_cases.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698