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

Unified Diff: tools/perf/page_sets/tough_video_cases.py

Issue 346923003: Add ActionRunner wrapper for the remaining less used actions (try 2): (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update unit test to skip test if touch is not supported. Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: tools/perf/page_sets/tough_video_cases.py
diff --git a/tools/perf/page_sets/tough_video_cases.py b/tools/perf/page_sets/tough_video_cases.py
index 25f4a3945351b1a5f20082d6a5281874caaf2bca..0c0f60c0839b142602442e74e125243e4effaa61 100644
--- a/tools/perf/page_sets/tough_video_cases.py
+++ b/tools/perf/page_sets/tough_video_cases.py
@@ -13,54 +13,28 @@ class ToughVideoCasesPage(page_module.Page):
super(ToughVideoCasesPage, self).__init__(url=url, page_set=page_set)
def LoopMixedAudio(self, action_runner):
- action_runner.RunAction(PlayAction(
- {
- 'wait_for_playing': True,
- 'wait_for_ended': False,
- 'selector': '#background_audio'
- }))
- action_runner.RunAction(LoopAction(
- {
- 'loop_count': 50,
- 'selector': '#mixed_audio'
- }))
+ action_runner.PlayMedia(selector='#background_audio',
+ playing_event_timeout_in_seconds=60)
+ action_runner.LoopMedia(loop_count=50, selector='#mixed_audio')
def LoopSingleAudio(self, action_runner):
- action_runner.RunAction(LoopAction(
- {
- 'loop_count': 50,
- 'selector': '#single_audio'
- }))
+ action_runner.LoopMedia(loop_count=50, selector='#single_audio')
def PlayAction(self, action_runner):
- action_runner.RunAction(PlayAction(
- {
- 'wait_for_playing': True,
- 'wait_for_ended': True
- }))
+ action_runner.PlayMedia(playing_event_timeout_in_seconds=60,
+ ended_event_timeout_in_seconds=60)
def SeekBeforeAndAfterPlayhead(self, action_runner):
- action_runner.RunAction(PlayAction(
- {
- 'wait_for_playing': True,
- 'wait_for_ended': False
- }))
+ action_runner.PlayMedia(playing_event_timeout_in_seconds=60,
+ ended_event_timeout_in_seconds=60)
# Wait for 1 second so that we know the play-head is at ~1s.
action_runner.Wait(1)
# Seek to before the play-head location.
- action_runner.RunAction(SeekAction(
- {
- 'seek_time': '0.5',
- 'wait_for_seeked': True,
- 'seek_label': 'seek_warm'
- }))
+ action_runner.SeekMedia(seconds=0.5, timeout_in_seconds=60,
+ label='seek_warm')
# Seek to after the play-head location.
- action_runner.RunAction(SeekAction(
- {
- 'seek_time': '9',
- 'wait_for_seeked': True,
- 'seek_label': 'seek_cold'
- }))
+ action_runner.SeekMedia(seconds=9, timeout_in_seconds=60,
+ label='seek_cold')
class Page1(ToughVideoCasesPage):
« no previous file with comments | « tools/perf/page_sets/tough_scheduling_cases.py ('k') | tools/telemetry/telemetry/page/actions/action_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698