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

Unified Diff: tools/perf/page_sets/media_cns_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
« no previous file with comments | « tools/perf/page_sets/key_mobile_sites.py ('k') | tools/perf/page_sets/mobile_memory.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/page_sets/media_cns_cases.py
diff --git a/tools/perf/page_sets/media_cns_cases.py b/tools/perf/page_sets/media_cns_cases.py
index 2ba2451ea4340efc8f85a14855a791b62226be07..efc3cf678f124c9a3eba06807288ed3758930a3b 100644
--- a/tools/perf/page_sets/media_cns_cases.py
+++ b/tools/perf/page_sets/media_cns_cases.py
@@ -14,37 +14,22 @@ class BasicPlayPage(page_module.Page):
self.add_browser_metrics = True
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 RunMediaMetrics(self, action_runner):
self.PlayAction(action_runner)
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)
# 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': 15,
- 'wait_for_seeked': True,
- 'seek_label': 'seek_cold'
- }))
+ action_runner.SeekMedia(seconds=15, timeout_in_seconds=60,
+ label='seek_cold')
class SeekBeforeAndAfterPlayheadPage(BasicPlayPage):
« no previous file with comments | « tools/perf/page_sets/key_mobile_sites.py ('k') | tools/perf/page_sets/mobile_memory.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698