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 measurements import smoothness_controller | 7 from measurements import smoothness_controller |
8 from measurements import timeline_controller | 8 from measurements import timeline_controller |
9 from telemetry.core.platform import tracing_category_filter | 9 from telemetry.core.platform import tracing_category_filter |
10 from telemetry.core.platform import tracing_options | 10 from telemetry.core.platform import tracing_options |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 tab.browser.platform.tracing_controller.Stop() | 137 tab.browser.platform.tracing_controller.Stop() |
138 | 138 |
139 | 139 |
140 class OilpanGCTimesForSmoothness(_OilpanGCTimesBase): | 140 class OilpanGCTimesForSmoothness(_OilpanGCTimesBase): |
141 def __init__(self): | 141 def __init__(self): |
142 super(OilpanGCTimesForSmoothness, self).__init__() | 142 super(OilpanGCTimesForSmoothness, self).__init__() |
143 self._interaction = None | 143 self._interaction = None |
144 | 144 |
145 def WillRunActions(self, page, tab): | 145 def WillRunActions(self, page, tab): |
146 runner = action_runner.ActionRunner(tab) | 146 runner = action_runner.ActionRunner(tab) |
147 self._interaction = runner.BeginInteraction(_RUN_SMOOTH_ACTIONS, | 147 self._interaction = runner.BeginInteraction(_RUN_SMOOTH_ACTIONS) |
148 is_smooth=True) | |
149 | 148 |
150 def DidRunActions(self, page, tab): | 149 def DidRunActions(self, page, tab): |
151 self._interaction.End() | 150 self._interaction.End() |
152 super(OilpanGCTimesForSmoothness, self).DidRunActions(page, tab) | 151 super(OilpanGCTimesForSmoothness, self).DidRunActions(page, tab) |
153 | 152 |
154 | 153 |
155 class OilpanGCTimesForBlinkPerf(_OilpanGCTimesBase): | 154 class OilpanGCTimesForBlinkPerf(_OilpanGCTimesBase): |
156 def __init__(self): | 155 def __init__(self): |
157 super(OilpanGCTimesForBlinkPerf, self).__init__() | 156 super(OilpanGCTimesForBlinkPerf, self).__init__() |
158 with open(os.path.join(os.path.dirname(__file__), '..', 'benchmarks', | 157 with open(os.path.join(os.path.dirname(__file__), '..', 'benchmarks', |
(...skipping 12 matching lines...) Expand all Loading... |
171 class OilpanGCTimesForInternals(_OilpanGCTimesBase): | 170 class OilpanGCTimesForInternals(_OilpanGCTimesBase): |
172 def __init__(self): | 171 def __init__(self): |
173 super(OilpanGCTimesForInternals, self).__init__() | 172 super(OilpanGCTimesForInternals, self).__init__() |
174 | 173 |
175 @classmethod | 174 @classmethod |
176 def CustomizeBrowserOptions(cls, options): | 175 def CustomizeBrowserOptions(cls, options): |
177 # 'expose-internals-for-testing' can be enabled on content shell. | 176 # 'expose-internals-for-testing' can be enabled on content shell. |
178 assert 'content-shell' in options.browser_type | 177 assert 'content-shell' in options.browser_type |
179 options.AppendExtraBrowserArgs(['--expose-internals-for-testing', | 178 options.AppendExtraBrowserArgs(['--expose-internals-for-testing', |
180 '--js-flags=--expose-gc']) | 179 '--js-flags=--expose-gc']) |
OLD | NEW |