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.core.platform import tracing_category_filter | 7 from telemetry.core.platform import tracing_category_filter |
8 from telemetry.core.platform import tracing_options | 8 from telemetry.core.platform import tracing_options |
9 from telemetry.page import action_runner | 9 from telemetry.page import action_runner |
10 from telemetry.page import page_test | 10 from telemetry.page import page_test |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 def CleanUpAfterPage(self, page, tab): | 161 def CleanUpAfterPage(self, page, tab): |
162 if tab.browser.platform.tracing_controller.is_tracing_running: | 162 if tab.browser.platform.tracing_controller.is_tracing_running: |
163 tab.browser.platform.tracing_controller.Stop() | 163 tab.browser.platform.tracing_controller.Stop() |
164 | 164 |
165 | 165 |
166 class OilpanGCTimesForSmoothness(_OilpanGCTimesBase): | 166 class OilpanGCTimesForSmoothness(_OilpanGCTimesBase): |
167 def __init__(self): | 167 def __init__(self): |
168 super(OilpanGCTimesForSmoothness, self).__init__() | 168 super(OilpanGCTimesForSmoothness, self).__init__() |
169 self._interaction = None | 169 self._interaction = None |
170 | 170 |
171 def WillRunActions(self, page, tab): | 171 def DidNavigateToPage(self, page, tab): |
172 runner = action_runner.ActionRunner(tab) | 172 runner = action_runner.ActionRunner(tab) |
173 self._interaction = runner.CreateInteraction(_RUN_SMOOTH_ACTIONS) | 173 self._interaction = runner.CreateInteraction(_RUN_SMOOTH_ACTIONS) |
174 self._interaction.Begin() | 174 self._interaction.Begin() |
175 | 175 |
176 def DidRunActions(self, page, tab): | 176 def DidRunActions(self, page, tab): |
177 self._interaction.End() | 177 self._interaction.End() |
178 super(OilpanGCTimesForSmoothness, self).DidRunActions(page, tab) | 178 super(OilpanGCTimesForSmoothness, self).DidRunActions(page, tab) |
179 | 179 |
180 | 180 |
181 class OilpanGCTimesForBlinkPerf(_OilpanGCTimesBase): | 181 class OilpanGCTimesForBlinkPerf(_OilpanGCTimesBase): |
(...skipping 15 matching lines...) Expand all Loading... |
197 class OilpanGCTimesForInternals(OilpanGCTimesForBlinkPerf): | 197 class OilpanGCTimesForInternals(OilpanGCTimesForBlinkPerf): |
198 def __init__(self): | 198 def __init__(self): |
199 super(OilpanGCTimesForInternals, self).__init__() | 199 super(OilpanGCTimesForInternals, self).__init__() |
200 | 200 |
201 @classmethod | 201 @classmethod |
202 def CustomizeBrowserOptions(cls, options): | 202 def CustomizeBrowserOptions(cls, options): |
203 # 'expose-internals-for-testing' can be enabled on content shell. | 203 # 'expose-internals-for-testing' can be enabled on content shell. |
204 assert 'content-shell' in options.browser_type | 204 assert 'content-shell' in options.browser_type |
205 options.AppendExtraBrowserArgs(['--expose-internals-for-testing', | 205 options.AppendExtraBrowserArgs(['--expose-internals-for-testing', |
206 '--js-flags=--expose-gc']) | 206 '--js-flags=--expose-gc']) |
OLD | NEW |