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

Unified Diff: tools/telemetry/telemetry/page/actions/seek.py

Issue 23456012: [Telemetry] Improve logging on media measurement tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix video.html check Created 7 years, 3 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/telemetry/telemetry/page/actions/seek.py
diff --git a/tools/telemetry/telemetry/page/actions/seek.py b/tools/telemetry/telemetry/page/actions/seek.py
index 12f66141076d266e5b1000757010f2e1962f00e9..cf4d14a197aae260a13e5663938408d675548f69 100644
--- a/tools/telemetry/telemetry/page/actions/seek.py
+++ b/tools/telemetry/telemetry/page/actions/seek.py
@@ -15,17 +15,15 @@ Action attributes are:
Default false.
- wait_timeout: Timeout to wait for seeked event. Only valid with
wait_for_seeked=true
+- seek_label: A suffix string to name the seek perf measurement.
"""
-from telemetry.page.actions.media_action import MediaAction
from telemetry.core import exceptions
from telemetry.page.actions import page_action
+import telemetry.page.actions.media_action as media_action
-class SeekAction(MediaAction):
- def __init__(self, attributes=None):
- super(SeekAction, self).__init__(attributes)
-
+class SeekAction(media_action.MediaAction):
def WillRunAction(self, page, tab):
"""Load the media metrics JS code prior to running the action."""
super(SeekAction, self).WillRunAction(page, tab)
@@ -36,8 +34,9 @@ class SeekAction(MediaAction):
assert hasattr(self, 'seek_time')
selector = self.selector if hasattr(self, 'selector') else ''
log_seek = self.log_seek == True if hasattr(self, 'log_seek') else True
- tab.ExecuteJavaScript('window.__seekMedia("%s", "%s", %i);' %
- (selector, self.seek_time, log_seek))
+ seek_label = self.seek_label if hasattr(self, 'seek_label') else ''
+ tab.ExecuteJavaScript('window.__seekMedia("%s", "%s", %i, "%s");' %
+ (selector, self.seek_time, log_seek, seek_label))
timeout = self.wait_timeout if hasattr(self, 'wait_timeout') else 60
# Check if we need to wait for 'seeked' event to fire.
if hasattr(self, 'wait_for_seeked') and self.wait_for_seeked:
« tools/perf/metrics/media.py ('K') | « tools/telemetry/telemetry/page/actions/seek.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698