| 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):
|
|
|