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 import sys | 4 import sys |
5 | 5 |
6 from measurements import smooth_gesture_util | 6 from measurements import smooth_gesture_util |
7 from telemetry.core.timeline.model import TimelineModel | 7 from telemetry.timeline.model import TimelineModel |
8 from telemetry.page import page_measurement | 8 from telemetry.page import page_measurement |
9 from telemetry.page.actions import action_runner | 9 from telemetry.page.actions import action_runner |
10 from telemetry.web_perf import timeline_interaction_record as tir_module | 10 from telemetry.web_perf import timeline_interaction_record as tir_module |
11 from telemetry.web_perf.metrics import smoothness | 11 from telemetry.web_perf.metrics import smoothness |
12 | 12 |
13 | 13 |
14 RUN_SMOOTH_ACTIONS = 'RunSmoothAllActions' | 14 RUN_SMOOTH_ACTIONS = 'RunSmoothAllActions' |
15 | 15 |
16 | 16 |
17 class MissingDisplayFrameRateError(page_measurement.MeasurementFailure): | 17 class MissingDisplayFrameRateError(page_measurement.MeasurementFailure): |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 for r in tab.browser.platform.GetRawDisplayFrameRateMeasurements(): | 93 for r in tab.browser.platform.GetRawDisplayFrameRateMeasurements(): |
94 if r.value is None: | 94 if r.value is None: |
95 raise MissingDisplayFrameRateError(r.name) | 95 raise MissingDisplayFrameRateError(r.name) |
96 results.Add(r.name, r.unit, r.value) | 96 results.Add(r.name, r.unit, r.value) |
97 | 97 |
98 def CleanUp(self, tab): | 98 def CleanUp(self, tab): |
99 if tab.browser.platform.IsRawDisplayFrameRateSupported(): | 99 if tab.browser.platform.IsRawDisplayFrameRateSupported(): |
100 tab.browser.platform.StopRawDisplayFrameRateMeasurement() | 100 tab.browser.platform.StopRawDisplayFrameRateMeasurement() |
101 if tab.browser.is_tracing_running: | 101 if tab.browser.is_tracing_running: |
102 tab.browser.StopTracing() | 102 tab.browser.StopTracing() |
OLD | NEW |