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

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

Issue 1029263003: [telemetry] Sort imports in Telemetry and its dependents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ensure we're up to date. Created 5 years, 9 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
« no previous file with comments | « tools/perf/measurements/smoothness_controller.py ('k') | tools/perf/measurements/startup.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import sys 4 import sys
5 5
6 from measurements import smoothness
7 from metrics import power
8 from telemetry import decorators
9 from telemetry.core import exceptions 6 from telemetry.core import exceptions
10 from telemetry.core import wpr_modes 7 from telemetry.core import wpr_modes
8 from telemetry import decorators
11 from telemetry.page import page 9 from telemetry.page import page
12 from telemetry.unittest_util import options_for_unittests 10 from telemetry.unittest_util import options_for_unittests
13 from telemetry.unittest_util import page_test_test_case 11 from telemetry.unittest_util import page_test_test_case
14 12
13 from measurements import smoothness
14 from metrics import power
15
16
15 class FakeTracingController(object): 17 class FakeTracingController(object):
16 def __init__(self): 18 def __init__(self):
17 self.category_filter = None 19 self.category_filter = None
18 def Start(self, _options, category_filter, _timeout): 20 def Start(self, _options, category_filter, _timeout):
19 self.category_filter = category_filter 21 self.category_filter = category_filter
20 22
21 class FakePlatform(object): 23 class FakePlatform(object):
22 def __init__(self): 24 def __init__(self):
23 self.tracing_controller = FakeTracingController() 25 self.tracing_controller = FakeTracingController()
24 def CanMonitorPower(self): 26 def CanMonitorPower(self):
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 self.fake_power = self._power_metric = FakePowerMetric(platform) 195 self.fake_power = self._power_metric = FakePowerMetric(platform)
194 196
195 measurement = BuggyMeasurement() 197 measurement = BuggyMeasurement()
196 try: 198 try:
197 self.RunMeasurement(measurement, ps) 199 self.RunMeasurement(measurement, ps)
198 except exceptions.IntentionalException: 200 except exceptions.IntentionalException:
199 pass 201 pass
200 202
201 self.assertTrue(measurement.fake_power.start_called) 203 self.assertTrue(measurement.fake_power.start_called)
202 self.assertTrue(measurement.fake_power.stop_called) 204 self.assertTrue(measurement.fake_power.stop_called)
OLDNEW
« no previous file with comments | « tools/perf/measurements/smoothness_controller.py ('k') | tools/perf/measurements/startup.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698