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

Unified Diff: tools/perf/benchmarks/media.py

Issue 131123008: Enable MSE perf tests. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: truncate > 80 chars lines Created 6 years, 11 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 | « no previous file | tools/perf/page_sets/mse_cases/startup_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/benchmarks/media.py
diff --git a/tools/perf/benchmarks/media.py b/tools/perf/benchmarks/media.py
index 57f72bc922eae4adc516a15e8fb59f2a7b163943..c1a47bb8f73e4cf65dbe5ef744b5381723fda332 100644
--- a/tools/perf/benchmarks/media.py
+++ b/tools/perf/benchmarks/media.py
@@ -13,8 +13,8 @@ from measurements import media
class MSEMeasurement(page_measurement.PageMeasurement):
def MeasurePage(self, page, tab, results):
media_metric = tab.EvaluateJavaScript('window.__testMetrics')
- trace = media_metric['id']
- metrics = media_metric['metrics']
+ trace = media_metric['id'] if 'id' in media_metric else None
+ metrics = media_metric['metrics'] if 'metrics' in media_metric else []
for m in metrics:
if isinstance(metrics[m], list):
values = [float(v) for v in metrics[m]]
@@ -71,12 +71,11 @@ class MediaSourceExtensions(test.Test):
test = media.Media
# Disable MSE media-tests on Android and linux: crbug/329691
# Disable MSE tests on windows 8 crbug.com/330910
- enabled = (not sys.platform.startswith('linux') and
- not sys.platform.startswith('win'))
test = MSEMeasurement
page_set = 'page_sets/mse_cases.json'
def CustomizeBrowserOptions(self, options):
# Needed to allow XHR requests to return stream objects.
options.AppendExtraBrowserArgs(
- '--enable-experimental-web-platform-features')
+ ['--enable-experimental-web-platform-features',
+ '--disable-gesture-requirement-for-media-playback'])
« no previous file with comments | « no previous file | tools/perf/page_sets/mse_cases/startup_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698