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 import os | 5 import os |
6 | 6 |
7 from telemetry.page import action_runner | |
8 from telemetry.page import page_test | 7 from telemetry.page import page_test |
9 from telemetry.timeline.model import TimelineModel | 8 from telemetry.timeline.model import TimelineModel |
10 from telemetry.timeline import tracing_config | 9 from telemetry.timeline import tracing_config |
11 from telemetry.value import list_of_scalar_values | 10 from telemetry.value import list_of_scalar_values |
12 from telemetry.value import scalar | 11 from telemetry.value import scalar |
13 | 12 |
14 | 13 |
15 _CR_RENDERER_MAIN = 'CrRendererMain' | 14 _CR_RENDERER_MAIN = 'CrRendererMain' |
16 _RUN_SMOOTH_ACTIONS = 'RunSmoothAllActions' | 15 _RUN_SMOOTH_ACTIONS = 'RunSmoothAllActions' |
17 | 16 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 platform.tracing_controller.StopTracing() | 156 platform.tracing_controller.StopTracing() |
158 | 157 |
159 | 158 |
160 class OilpanGCTimesForSmoothness(_OilpanGCTimesBase): | 159 class OilpanGCTimesForSmoothness(_OilpanGCTimesBase): |
161 | 160 |
162 def __init__(self): | 161 def __init__(self): |
163 super(OilpanGCTimesForSmoothness, self).__init__() | 162 super(OilpanGCTimesForSmoothness, self).__init__() |
164 self._interaction = None | 163 self._interaction = None |
165 | 164 |
166 def DidNavigateToPage(self, page, tab): | 165 def DidNavigateToPage(self, page, tab): |
167 runner = action_runner.ActionRunner(tab) | 166 self._interaction = tab.action_runner.CreateInteraction(_RUN_SMOOTH_ACTIONS) |
168 self._interaction = runner.CreateInteraction(_RUN_SMOOTH_ACTIONS) | |
169 self._interaction.Begin() | 167 self._interaction.Begin() |
170 | 168 |
171 def ValidateAndMeasurePage(self, page, tab, results): | 169 def ValidateAndMeasurePage(self, page, tab, results): |
172 self._interaction.End() | 170 self._interaction.End() |
173 super(OilpanGCTimesForSmoothness, self).ValidateAndMeasurePage( | 171 super(OilpanGCTimesForSmoothness, self).ValidateAndMeasurePage( |
174 page, tab, results) | 172 page, tab, results) |
175 | 173 |
176 | 174 |
177 class OilpanGCTimesForBlinkPerf(_OilpanGCTimesBase): | 175 class OilpanGCTimesForBlinkPerf(_OilpanGCTimesBase): |
178 | 176 |
(...skipping 17 matching lines...) Expand all Loading... |
196 | 194 |
197 def __init__(self): | 195 def __init__(self): |
198 super(OilpanGCTimesForInternals, self).__init__() | 196 super(OilpanGCTimesForInternals, self).__init__() |
199 | 197 |
200 @classmethod | 198 @classmethod |
201 def CustomizeBrowserOptions(cls, options): | 199 def CustomizeBrowserOptions(cls, options): |
202 # 'expose-internals-for-testing' can be enabled on content shell. | 200 # 'expose-internals-for-testing' can be enabled on content shell. |
203 assert 'content-shell' in options.browser_type | 201 assert 'content-shell' in options.browser_type |
204 options.AppendExtraBrowserArgs(['--expose-internals-for-testing', | 202 options.AppendExtraBrowserArgs(['--expose-internals-for-testing', |
205 '--js-flags=--expose-gc']) | 203 '--js-flags=--expose-gc']) |
OLD | NEW |