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

Side by Side Diff: tools/perf/measurements/media.py

Issue 2855333002: telemetry: support old builds that still use disable-gesture-requirement-for-media-playback flag. (Closed)
Patch Set: fix blink_perf as well Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from telemetry.page import legacy_page_test 5 from telemetry.page import legacy_page_test
6 6
7 from metrics import cpu 7 from metrics import cpu
8 from metrics import media 8 from metrics import media
9 from metrics import power 9 from metrics import power
10 from metrics import system_memory 10 from metrics import system_memory
(...skipping 13 matching lines...) Expand all
24 self._add_browser_metrics = False 24 self._add_browser_metrics = False
25 self._cpu_metric = None 25 self._cpu_metric = None
26 self._memory_metric = None 26 self._memory_metric = None
27 self._power_metric = None 27 self._power_metric = None
28 28
29 def WillStartBrowser(self, platform): 29 def WillStartBrowser(self, platform):
30 self._power_metric = power.PowerMetric(platform) 30 self._power_metric = power.PowerMetric(platform)
31 31
32 def CustomizeBrowserOptions(self, options): 32 def CustomizeBrowserOptions(self, options):
33 # Needed to run media actions in JS on touch-based devices as on Android. 33 # Needed to run media actions in JS on touch-based devices as on Android.
34 options.AppendExtraBrowserArgs('--ignore-autoplay-restrictions') 34 # Note that both of these flags should be used until every build from
35 # ToT to Stable switches over to one flag or another. This is to support
36 # reference builds.
37 options.AppendExtraBrowserArgs(
38 ['--ignore-autoplay-restrictions',
39 '--disable-gesture-requirement-for-media-playback'])
35 power.PowerMetric.CustomizeBrowserOptions(options) 40 power.PowerMetric.CustomizeBrowserOptions(options)
36 41
37 def DidNavigateToPage(self, page, tab): 42 def DidNavigateToPage(self, page, tab):
38 """Override to do operations right after the page is navigated.""" 43 """Override to do operations right after the page is navigated."""
39 self._media_metric = media.MediaMetric(tab) 44 self._media_metric = media.MediaMetric(tab)
40 self._media_metric.Start(page, tab) 45 self._media_metric.Start(page, tab)
41 46
42 # Reset to false for every page. 47 # Reset to false for every page.
43 self._add_browser_metrics = ( 48 self._add_browser_metrics = (
44 page.add_browser_metrics 49 page.add_browser_metrics
(...skipping 19 matching lines...) Expand all
64 exclude_metrics = ['WorkingSetSizePeak', 'SystemCommitCharge', 'VMPeak', 69 exclude_metrics = ['WorkingSetSizePeak', 'SystemCommitCharge', 'VMPeak',
65 'VM'] 70 'VM']
66 self._memory_metric.AddResults(tab, results, 71 self._memory_metric.AddResults(tab, results,
67 trace_name=trace_name, 72 trace_name=trace_name,
68 exclude_metrics=exclude_metrics) 73 exclude_metrics=exclude_metrics)
69 self._power_metric.AddResults(tab, results) 74 self._power_metric.AddResults(tab, results)
70 75
71 def DidRunPage(self, platform): 76 def DidRunPage(self, platform):
72 del platform # unused 77 del platform # unused
73 self._power_metric.Close() 78 self._power_metric.Close()
OLDNEW
« tools/perf/benchmarks/blink_perf.py ('K') | « tools/perf/benchmarks/media.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698