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

Side by Side Diff: tools/perf/metrics/webrtc_stats_unittest.py

Issue 1134363002: Enable old-style-class lint check for telemetry & perf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | tools/perf/pylintrc » ('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 4
5 import unittest 5 import unittest
6 6
7 from telemetry.unittest_util import simple_mock 7 from telemetry.unittest_util import simple_mock
8 8
9 from metrics import webrtc_stats 9 from metrics import webrtc_stats
10 10
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 { 80 {
81 "googAvailableSendBandwidth":"40000", 81 "googAvailableSendBandwidth":"40000",
82 "googAvailableRecvBandwidth":"22345", 82 "googAvailableRecvBandwidth":"22345",
83 "googTargetEncBitrate":"20000" 83 "googTargetEncBitrate":"20000"
84 } 84 }
85 ] 85 ]
86 ]] 86 ]]
87 ''' 87 '''
88 88
89 89
90 class FakeResults: 90 class FakeResults(object):
91 def __init__(self, current_page): 91 def __init__(self, current_page):
92 self._received_values = [] 92 self._received_values = []
93 self._current_page = current_page 93 self._current_page = current_page
94 94
95 @property 95 @property
96 def received_values(self): 96 def received_values(self):
97 return self._received_values 97 return self._received_values
98 98
99 @property 99 @property
100 def current_page(self): 100 def current_page(self):
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 # from video reports (even though audio_input_level is quite obvious). 154 # from video reports (even though audio_input_level is quite obvious).
155 self.assertNotIn('peer_connection_0_audio_audio_input_level', all_names, 155 self.assertNotIn('peer_connection_0_audio_audio_input_level', all_names,
156 'Input level is in the JSON for both connections but ' 156 'Input level is in the JSON for both connections but '
157 'should not be reported since it is not interesting.') 157 'should not be reported since it is not interesting.')
158 self.assertNotIn('peer_connection_1_audio_audio_input_level', all_names) 158 self.assertNotIn('peer_connection_1_audio_audio_input_level', all_names)
159 159
160 def testReturnsIfJsonIsEmpty(self): 160 def testReturnsIfJsonIsEmpty(self):
161 results = self._RunMetricOnJson('[]') 161 results = self._RunMetricOnJson('[]')
162 self.assertFalse(results.received_values) 162 self.assertFalse(results.received_values)
163 163
OLDNEW
« no previous file with comments | « no previous file | tools/perf/pylintrc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698