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

Side by Side Diff: telemetry/telemetry/internal/platform/power_monitor/msr_power_monitor_unittest.py

Issue 3016583002: Remove Windows MSR power monitoring code (Closed)
Patch Set: Created 3 years, 3 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
(Empty)
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.
4
5 import logging
6 import time
7 import unittest
8
9 from telemetry import decorators
10 from telemetry.internal.platform.power_monitor import msr_power_monitor
11 from telemetry.internal.platform import win_platform_backend
12
13
14 class MsrPowerMonitorTest(unittest.TestCase):
15 @decorators.Disabled('all') # http://crbug.com/712486
16 #@decorators.Enabled('xp', 'win7', 'win8') # http://crbug.com/479337
17 def testMsrRuns(self):
18 platform_backend = win_platform_backend.WinPlatformBackend()
19 power_monitor = msr_power_monitor.MsrPowerMonitorWin(platform_backend)
20 if not power_monitor.CanMonitorPower():
21 logging.warning('Test not supported on this platform.')
22 return
23
24 power_monitor.StartMonitoringPower(None)
25 time.sleep(0.01)
26 statistics = power_monitor.StopMonitoringPower()
27
28 self.assertEqual(statistics['identifier'], 'msr')
29 self.assertIn('energy_consumption_mwh', statistics)
30 self.assertGreater(statistics['energy_consumption_mwh'], 0)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698