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 import story |
4 from telemetry.page import page as page_module | 5 from telemetry.page import page as page_module |
5 from telemetry.page import page_set as page_set_module | |
6 | 6 |
7 | 7 |
8 class BasicPlayPage(page_module.Page): | 8 class BasicPlayPage(page_module.Page): |
9 | 9 |
10 def __init__(self, url, page_set): | 10 def __init__(self, url, page_set): |
11 super(BasicPlayPage, self).__init__(url=url, page_set=page_set) | 11 super(BasicPlayPage, self).__init__(url=url, page_set=page_set) |
12 self.add_browser_metrics = True | 12 self.add_browser_metrics = True |
13 | 13 |
14 def PlayAction(self, action_runner): | 14 def PlayAction(self, action_runner): |
15 action_runner.PlayMedia(playing_event_timeout_in_seconds=60, | 15 action_runner.PlayMedia(playing_event_timeout_in_seconds=60, |
(...skipping 17 matching lines...) Expand all Loading... |
33 | 33 |
34 def __init__(self, url, page_set): | 34 def __init__(self, url, page_set): |
35 super(SeekBeforeAndAfterPlayheadPage, self).__init__(url=url, | 35 super(SeekBeforeAndAfterPlayheadPage, self).__init__(url=url, |
36 page_set=page_set) | 36 page_set=page_set) |
37 self.add_browser_metrics = False | 37 self.add_browser_metrics = False |
38 | 38 |
39 def RunPageInteractions(self, action_runner): | 39 def RunPageInteractions(self, action_runner): |
40 self.SeekBeforeAndAfterPlayhead(action_runner) | 40 self.SeekBeforeAndAfterPlayhead(action_runner) |
41 | 41 |
42 | 42 |
43 class MediaCnsCasesPageSet(page_set_module.PageSet): | 43 class MediaCnsCasesPageSet(story.StorySet): |
44 | 44 |
45 """ Media benchmark on network constrained conditions. """ | 45 """ Media benchmark on network constrained conditions. """ |
46 | 46 |
47 def __init__(self): | 47 def __init__(self): |
48 super(MediaCnsCasesPageSet, self).__init__() | 48 super(MediaCnsCasesPageSet, self).__init__() |
49 | 49 |
50 urls_list = [ | 50 urls_list = [ |
51 # pylint: disable=C0301 | 51 # pylint: disable=C0301 |
52 'file://tough_video_cases/video.html?id=no_constraints_webm&src=tulip2.web
m&net=none', | 52 'file://tough_video_cases/video.html?id=no_constraints_webm&src=tulip2.web
m&net=none', |
53 # pylint: disable=C0301 | 53 # pylint: disable=C0301 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 # pylint: disable=C0301 | 107 # pylint: disable=C0301 |
108 'file://tough_video_cases/video.html?id=wifi_mp4&src=tulip2.mp4&type=audio
&net=wifi', | 108 'file://tough_video_cases/video.html?id=wifi_mp4&src=tulip2.mp4&type=audio
&net=wifi', |
109 # pylint: disable=C0301 | 109 # pylint: disable=C0301 |
110 'file://tough_video_cases/video.html?id=wifi_ogv&src=tulip2.ogv&type=audio
&net=wifi', | 110 'file://tough_video_cases/video.html?id=wifi_ogv&src=tulip2.ogv&type=audio
&net=wifi', |
111 # pylint: disable=C0301 | 111 # pylint: disable=C0301 |
112 'file://tough_video_cases/video.html?id=wifi_webm&src=tulip2.webm&type=aud
io&net=wifi' | 112 'file://tough_video_cases/video.html?id=wifi_webm&src=tulip2.webm&type=aud
io&net=wifi' |
113 ] | 113 ] |
114 | 114 |
115 for url in urls_list2: | 115 for url in urls_list2: |
116 self.AddUserStory(SeekBeforeAndAfterPlayheadPage(url, self)) | 116 self.AddUserStory(SeekBeforeAndAfterPlayheadPage(url, self)) |
OLD | NEW |