| 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 | 4 |
| 5 from telemetry.page import page_test |
| 6 |
| 7 from measurements import smoothness_controller |
| 5 from metrics import power | 8 from metrics import power |
| 6 from measurements import smoothness_controller | |
| 7 from telemetry.page import page_test | |
| 8 | 9 |
| 9 | 10 |
| 10 class Smoothness(page_test.PageTest): | 11 class Smoothness(page_test.PageTest): |
| 11 def __init__(self): | 12 def __init__(self): |
| 12 super(Smoothness, self).__init__() | 13 super(Smoothness, self).__init__() |
| 13 self._power_metric = None | 14 self._power_metric = None |
| 14 self._smoothness_controller = None | 15 self._smoothness_controller = None |
| 15 | 16 |
| 16 @classmethod | 17 @classmethod |
| 17 def CustomizeBrowserOptions(cls, options): | 18 def CustomizeBrowserOptions(cls, options): |
| (...skipping 19 matching lines...) Expand all Loading... |
| 37 | 38 |
| 38 def ValidateAndMeasurePage(self, page, tab, results): | 39 def ValidateAndMeasurePage(self, page, tab, results): |
| 39 self._power_metric.AddResults(tab, results) | 40 self._power_metric.AddResults(tab, results) |
| 40 self._smoothness_controller.AddResults(tab, results) | 41 self._smoothness_controller.AddResults(tab, results) |
| 41 | 42 |
| 42 def CleanUpAfterPage(self, page, tab): | 43 def CleanUpAfterPage(self, page, tab): |
| 43 if self._power_metric: | 44 if self._power_metric: |
| 44 self._power_metric.Stop(page, tab) | 45 self._power_metric.Stop(page, tab) |
| 45 if self._smoothness_controller: | 46 if self._smoothness_controller: |
| 46 self._smoothness_controller.CleanUp(tab) | 47 self._smoothness_controller.CleanUp(tab) |
| OLD | NEW |