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

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

Issue 765773004: telemetry: Clean up SurfaceFlinger statistics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clean-up Created 6 years 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
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 6 from measurements import smoothness
7 from metrics import power 7 from metrics import power
8 from telemetry.core import exceptions 8 from telemetry.core import exceptions
9 from telemetry.core import wpr_modes 9 from telemetry.core import wpr_modes
10 from telemetry.page import page 10 from telemetry.page import page
11 from telemetry.unittest_util import options_for_unittests 11 from telemetry.unittest_util import options_for_unittests
12 from telemetry.unittest_util import page_test_test_case 12 from telemetry.unittest_util import page_test_test_case
13 from telemetry.unittest_util import test 13 from telemetry.unittest_util import test
14 14
15 class FakeTracingController(object): 15 class FakeTracingController(object):
16 def __init__(self): 16 def __init__(self):
17 self.category_filter = None 17 self.category_filter = None
18 def Start(self, _options, category_filter, _timeout): 18 def Start(self, _options, category_filter, _timeout):
19 self.category_filter = category_filter 19 self.category_filter = category_filter
20 20
21 21
22 class FakePlatform(object): 22 class FakePlatform(object):
23 def __init__(self): 23 def __init__(self):
24 self.tracing_controller = FakeTracingController() 24 self.tracing_controller = FakeTracingController()
25 def IsRawDisplayFrameRateSupported(self): 25 def IsDisplayTracingSupported(self):
26 return False 26 return False
27 def CanMonitorPower(self): 27 def CanMonitorPower(self):
28 return False 28 return False
29 29
30 30
31 class FakeBrowser(object): 31 class FakeBrowser(object):
32 def __init__(self): 32 def __init__(self):
33 self.platform = FakePlatform() 33 self.platform = FakePlatform()
34 34
35 35
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 self.fake_power = self._power_metric = FakePowerMetric(platform) 173 self.fake_power = self._power_metric = FakePowerMetric(platform)
174 174
175 measurement = BuggyMeasurement() 175 measurement = BuggyMeasurement()
176 try: 176 try:
177 self.RunMeasurement(measurement, ps) 177 self.RunMeasurement(measurement, ps)
178 except exceptions.IntentionalException: 178 except exceptions.IntentionalException:
179 pass 179 pass
180 180
181 self.assertTrue(measurement.fake_power.start_called) 181 self.assertTrue(measurement.fake_power.start_called)
182 self.assertTrue(measurement.fake_power.stop_called) 182 self.assertTrue(measurement.fake_power.stop_called)
OLDNEW
« no previous file with comments | « tools/perf/measurements/smoothness_controller.py ('k') | tools/telemetry/telemetry/core/platform/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698