Index: tools/perf/measurements/tab_switching.py |
diff --git a/tools/perf/measurements/tab_switching.py b/tools/perf/measurements/tab_switching.py |
index d0012a407600cac0503988f2db8f1ba91b079d74..903cf14fa43739debba04c0e0589de5e3ef01f4b 100644 |
--- a/tools/perf/measurements/tab_switching.py |
+++ b/tools/perf/measurements/tab_switching.py |
@@ -62,10 +62,11 @@ class TabSwitching(page_test.PageTest): |
# Measure power usage of tabs after quiescence. |
util.WaitFor(tab.HasReachedQuiescence, 60) |
- self._power_metric.Start(page, tab) |
- time.sleep(TabSwitching.SAMPLE_TIME) |
- self._power_metric.Stop(page, tab) |
- self._power_metric.AddResults(tab, results,) |
+ if tab.browser.platform.CanMonitorPower(): |
+ self._power_metric.Start(page, tab) |
+ time.sleep(TabSwitching.SAMPLE_TIME) |
+ self._power_metric.Stop(page, tab) |
+ self._power_metric.AddResults(tab, results,) |
histogram_name = 'MPArch.RWH_TabSwitchPaintDuration' |
histogram_type = histogram_util.BROWSER_HISTOGRAM |