OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 |
5 from measurements import smoothness_controller | 7 from measurements import smoothness_controller |
6 from telemetry.page import page_test | |
7 | 8 |
8 | 9 |
9 class Repaint(page_test.PageTest): | 10 class Repaint(page_test.PageTest): |
10 def __init__(self, mode='viewport', width=None, height=None): | 11 def __init__(self, mode='viewport', width=None, height=None): |
11 super(Repaint, self).__init__() | 12 super(Repaint, self).__init__() |
12 self._smoothness_controller = None | 13 self._smoothness_controller = None |
13 self._micro_benchmark_id = None | 14 self._micro_benchmark_id = None |
14 self._mode = mode | 15 self._mode = mode |
15 self._width = width | 16 self._width = width |
16 self._height = height | 17 self._height = height |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 "notify_done": true | 64 "notify_done": true |
64 }); | 65 }); |
65 """) | 66 """) |
66 self._smoothness_controller.Stop(tab) | 67 self._smoothness_controller.Stop(tab) |
67 | 68 |
68 def ValidateAndMeasurePage(self, page, tab, results): | 69 def ValidateAndMeasurePage(self, page, tab, results): |
69 self._smoothness_controller.AddResults(tab, results) | 70 self._smoothness_controller.AddResults(tab, results) |
70 | 71 |
71 def CleanUpAfterPage(self, _, tab): | 72 def CleanUpAfterPage(self, _, tab): |
72 self._smoothness_controller.CleanUp(tab) | 73 self._smoothness_controller.CleanUp(tab) |
OLD | NEW |