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

Unified Diff: tools/telemetry/telemetry/core/platform/platform_backend_unittest.py

Issue 178363005: [Telemetry] Measure power in tab_switching measurement (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix copyright year Created 6 years, 10 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/core/platform/platform_backend_unittest.py
diff --git a/tools/telemetry/telemetry/core/platform/platform_backend_unittest.py b/tools/telemetry/telemetry/core/platform/platform_backend_unittest.py
index 4909349d7fd4b5101910981155e141815063aa9a..2e568bec11427520ffd60dd1bde5d2d74a1f40a1 100644
--- a/tools/telemetry/telemetry/core/platform/platform_backend_unittest.py
+++ b/tools/telemetry/telemetry/core/platform/platform_backend_unittest.py
@@ -9,13 +9,14 @@ from telemetry.core.platform import factory
class PlatformBackendTest(unittest.TestCase):
- def testPowerMonitoringSync(self):
+ def testPowerMonitoringAsync(self):
# Tests that the act of monitoring power doesn't blow up.
backend = factory.GetPlatformBackendForCurrentOS()
- if not backend.CanMonitorPowerSync():
+ if not backend.CanMonitorPowerAsync():
logging.warning('Test not supported on this platform.')
return
- output = backend.MonitorPowerSync(1)
+ backend.StartMonitoringPowerAsync()
+ output = backend.StopMonitoringPowerAsync()
self.assertTrue(output.has_key('power_samples_mw'))
self.assertTrue(output.has_key('identifier'))

Powered by Google App Engine
This is Rietveld 408576698