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

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

Issue 321563003: Add Wait* API to ActionRunner to wrap over WaitAction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing to head. Created 6 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/maps.py ('k') | tools/perf/page_sets/mobile_memory.py » ('j') | 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 # pylint: disable=W0401,W0614 4 # pylint: disable=W0401,W0614
5 from telemetry.page.actions.all_page_actions import * 5 from telemetry.page.actions.all_page_actions import *
6 from telemetry.page import page as page_module 6 from telemetry.page import page as page_module
7 from telemetry.page import page_set as page_set_module 7 from telemetry.page import page_set as page_set_module
8 8
9 9
10 class BasicPlayPage(page_module.Page): 10 class BasicPlayPage(page_module.Page):
(...skipping 12 matching lines...) Expand all
23 def RunMediaMetrics(self, action_runner): 23 def RunMediaMetrics(self, action_runner):
24 self.PlayAction(action_runner) 24 self.PlayAction(action_runner)
25 25
26 def SeekBeforeAndAfterPlayhead(self, action_runner): 26 def SeekBeforeAndAfterPlayhead(self, action_runner):
27 action_runner.RunAction(PlayAction( 27 action_runner.RunAction(PlayAction(
28 { 28 {
29 'wait_for_playing': True, 29 'wait_for_playing': True,
30 'wait_for_ended': False 30 'wait_for_ended': False
31 })) 31 }))
32 # Wait for 1 second so that we know the play-head is at ~1s. 32 # Wait for 1 second so that we know the play-head is at ~1s.
33 action_runner.RunAction(WaitAction( 33 action_runner.Wait(1)
34 {
35 'seconds': 1
36 }))
37 # Seek to before the play-head location. 34 # Seek to before the play-head location.
38 action_runner.RunAction(SeekAction( 35 action_runner.RunAction(SeekAction(
39 { 36 {
40 'seek_time': '0.5', 37 'seek_time': '0.5',
41 'wait_for_seeked': True, 38 'wait_for_seeked': True,
42 'seek_label': 'seek_warm' 39 'seek_label': 'seek_warm'
43 })) 40 }))
44 # Seek to after the play-head location. 41 # Seek to after the play-head location.
45 action_runner.RunAction(SeekAction( 42 action_runner.RunAction(SeekAction(
46 { 43 {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 # pylint: disable=C0301 124 # pylint: disable=C0301
128 'file://tough_video_cases/video.html?id=wifi_mp4&src=tulip2.mp4&type=audio &net=wifi', 125 'file://tough_video_cases/video.html?id=wifi_mp4&src=tulip2.mp4&type=audio &net=wifi',
129 # pylint: disable=C0301 126 # pylint: disable=C0301
130 'file://tough_video_cases/video.html?id=wifi_ogv&src=tulip2.ogv&type=audio &net=wifi', 127 'file://tough_video_cases/video.html?id=wifi_ogv&src=tulip2.ogv&type=audio &net=wifi',
131 # pylint: disable=C0301 128 # pylint: disable=C0301
132 'file://tough_video_cases/video.html?id=wifi_webm&src=tulip2.webm&type=aud io&net=wifi' 129 'file://tough_video_cases/video.html?id=wifi_webm&src=tulip2.webm&type=aud io&net=wifi'
133 ] 130 ]
134 131
135 for url in urls_list2: 132 for url in urls_list2:
136 self.AddPage(SeekBeforeAndAfterPlayheadPage(url, self)) 133 self.AddPage(SeekBeforeAndAfterPlayheadPage(url, self))
OLDNEW
« no previous file with comments | « tools/perf/page_sets/maps.py ('k') | tools/perf/page_sets/mobile_memory.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698