| OLD | NEW |
| 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 # pylint: disable=W0401,W0614 | |
| 11 from telemetry.page.actions.all_page_actions import * | |
| 12 from telemetry.unittest import options_for_unittests | 10 from telemetry.unittest import options_for_unittests |
| 13 | 11 |
| 14 class FakePlatform(object): | 12 class FakePlatform(object): |
| 15 def IsRawDisplayFrameRateSupported(self): | 13 def IsRawDisplayFrameRateSupported(self): |
| 16 return False | 14 return False |
| 17 def CanMonitorPower(self): | 15 def CanMonitorPower(self): |
| 18 return False | 16 return False |
| 19 | 17 |
| 20 | 18 |
| 21 class FakeBrowser(object): | 19 class FakeBrowser(object): |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 measurement = smoothness.Smoothness() | 124 measurement = smoothness.Smoothness() |
| 127 results = self.RunMeasurement(measurement, ps, options=self._options) | 125 results = self.RunMeasurement(measurement, ps, options=self._options) |
| 128 self.assertEquals(0, len(results.failures)) | 126 self.assertEquals(0, len(results.failures)) |
| 129 | 127 |
| 130 mostly_smooth = results.FindAllPageSpecificValuesNamed('mostly_smooth') | 128 mostly_smooth = results.FindAllPageSpecificValuesNamed('mostly_smooth') |
| 131 self.assertEquals(len(mostly_smooth), 1) | 129 self.assertEquals(len(mostly_smooth), 1) |
| 132 self.assertGreaterEqual(mostly_smooth[0].GetRepresentativeNumber(), 0) | 130 self.assertGreaterEqual(mostly_smooth[0].GetRepresentativeNumber(), 0) |
| 133 | 131 |
| 134 def testCleanUpTrace(self): | 132 def testCleanUpTrace(self): |
| 135 self.TestTracingCleanedUp(smoothness.Smoothness, self._options) | 133 self.TestTracingCleanedUp(smoothness.Smoothness, self._options) |
| OLD | NEW |