1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
8 from telemetry.core import platform
11 class PlatformBackendTest(unittest.TestCase):
12 def testPowerMonitoringSync(self):
13 # Tests that the act of monitoring power doesn't blow up.
14 backend = platform.CreatePlatformBackendForCurrentOS()
15 if not backend.CanMonitorPowerSync():
16 logging.warning('Test not supported on this platform.')
19 output = backend.MonitorPowerSync(1)
20 self.assertTrue(output.has_key('power_samples_mw'))
21 self.assertTrue(output.has_key('identifier'))