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 measurements import smoothness_controller | 5 from measurements import smoothness_controller |
6 from telemetry.page import page_test | 6 from telemetry.page import page_test |
7 | 7 |
8 | 8 |
9 class Repaint(page_test.PageTest): | 9 class Repaint(page_test.PageTest): |
10 def __init__(self, mode='viewport', width=None, height=None): | 10 def __init__(self, mode='viewport', width=None, height=None): |
11 super(Repaint, self).__init__('RunRepaint', False) | 11 super(Repaint, self).__init__('RunPageInteractions', False) |
12 self._smoothness_controller = None | 12 self._smoothness_controller = None |
13 self._micro_benchmark_id = None | 13 self._micro_benchmark_id = None |
14 self._mode = mode | 14 self._mode = mode |
15 self._width = width | 15 self._width = width |
16 self._height = height | 16 self._height = height |
17 | 17 |
18 def CustomizeBrowserOptions(self, options): | 18 def CustomizeBrowserOptions(self, options): |
19 options.AppendExtraBrowserArgs([ | 19 options.AppendExtraBrowserArgs([ |
20 '--enable-impl-side-painting', | 20 '--enable-impl-side-painting', |
21 '--enable-threaded-compositing', | 21 '--enable-threaded-compositing', |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 "notify_done": true | 63 "notify_done": true |
64 }); | 64 }); |
65 """) | 65 """) |
66 self._smoothness_controller.Stop(tab) | 66 self._smoothness_controller.Stop(tab) |
67 | 67 |
68 def ValidateAndMeasurePage(self, page, tab, results): | 68 def ValidateAndMeasurePage(self, page, tab, results): |
69 self._smoothness_controller.AddResults(tab, results) | 69 self._smoothness_controller.AddResults(tab, results) |
70 | 70 |
71 def CleanUpAfterPage(self, _, tab): | 71 def CleanUpAfterPage(self, _, tab): |
72 self._smoothness_controller.CleanUp(tab) | 72 self._smoothness_controller.CleanUp(tab) |
OLD | NEW |