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

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

Issue 222413002: Adding dumpsys based power monitor for android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: W0212 warnings Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/perf/metrics/power.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 6 from measurements import smoothness
7 from telemetry.core import wpr_modes 7 from telemetry.core import wpr_modes
8 from telemetry.page import page 8 from telemetry.page import page
9 from telemetry.page import page_measurement_unittest_base 9 from telemetry.page import page_measurement_unittest_base
10 from telemetry.unittest import options_for_unittests 10 from telemetry.unittest import options_for_unittests
11 11
12 class FakePlatform(object): 12 class FakePlatform(object):
13 def IsRawDisplayFrameRateSupported(self): 13 def IsRawDisplayFrameRateSupported(self):
14 return False 14 return False
15 def CanMonitorPowerAsync(self): 15 def CanMonitorPower(self):
16 return False 16 return False
17 17
18 18
19 class FakeBrowser(object): 19 class FakeBrowser(object):
20 def __init__(self): 20 def __init__(self):
21 self.platform = FakePlatform() 21 self.platform = FakePlatform()
22 self.category_filter = None 22 self.category_filter = None
23 23
24 def StartTracing(self, category_filter, _): 24 def StartTracing(self, category_filter, _):
25 self.category_filter = category_filter 25 self.category_filter = category_filter
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 mean_touch_scroll_latency = results.FindAllPageSpecificValuesNamed( 104 mean_touch_scroll_latency = results.FindAllPageSpecificValuesNamed(
105 'mean_touch_scroll_latency') 105 'mean_touch_scroll_latency')
106 if mean_touch_scroll_latency: 106 if mean_touch_scroll_latency:
107 self.assertEquals(len(mean_touch_scroll_latency), 1) 107 self.assertEquals(len(mean_touch_scroll_latency), 1)
108 self.assertGreater( 108 self.assertGreater(
109 mean_touch_scroll_latency[0].GetRepresentativeNumber(), 0) 109 mean_touch_scroll_latency[0].GetRepresentativeNumber(), 0)
110 110
111 def testCleanUpTrace(self): 111 def testCleanUpTrace(self):
112 self.TestTracingCleanedUp(smoothness.Smoothness, self._options) 112 self.TestTracingCleanedUp(smoothness.Smoothness, self._options)
OLDNEW
« no previous file with comments | « no previous file | tools/perf/metrics/power.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698