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 telemetry.page import page_test | 5 from telemetry.page import legacy_page_test |
6 from telemetry.timeline.model import TimelineModel | 6 from telemetry.timeline.model import TimelineModel |
7 from telemetry.timeline import tracing_config | 7 from telemetry.timeline import tracing_config |
8 from telemetry.value import trace | 8 from telemetry.value import trace |
9 from telemetry.web_perf import smooth_gesture_util | 9 from telemetry.web_perf import smooth_gesture_util |
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 | 11 |
12 | 12 |
13 RUN_SMOOTH_ACTIONS = 'RunSmoothAllActions' | 13 RUN_SMOOTH_ACTIONS = 'RunSmoothAllActions' |
14 | 14 |
15 | 15 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 self.model, r)) | 76 self.model, r)) |
77 | 77 |
78 # If there is no other smooth records, we make measurements on time range | 78 # If there is no other smooth records, we make measurements on time range |
79 # marked by timeline_controller itself. | 79 # marked by timeline_controller itself. |
80 # TODO(nednguyen): when crbug.com/239179 is marked fixed, makes sure that | 80 # TODO(nednguyen): when crbug.com/239179 is marked fixed, makes sure that |
81 # page sets are responsible for issueing the markers themselves. | 81 # page sets are responsible for issueing the markers themselves. |
82 if len(self._smooth_records) == 0 and run_smooth_actions_record: | 82 if len(self._smooth_records) == 0 and run_smooth_actions_record: |
83 self._smooth_records = [run_smooth_actions_record] | 83 self._smooth_records = [run_smooth_actions_record] |
84 | 84 |
85 if len(self._smooth_records) == 0: | 85 if len(self._smooth_records) == 0: |
86 raise page_test.Failure('No interaction record was created.') | 86 raise legacy_page_test.Failure('No interaction record was created.') |
87 | 87 |
88 def CleanUp(self, platform): | 88 def CleanUp(self, platform): |
89 if platform.tracing_controller.is_tracing_running: | 89 if platform.tracing_controller.is_tracing_running: |
90 platform.tracing_controller.StopTracing() | 90 platform.tracing_controller.StopTracing() |
91 | 91 |
92 @property | 92 @property |
93 def model(self): | 93 def model(self): |
94 return self._model | 94 return self._model |
95 | 95 |
96 @property | 96 @property |
97 def renderer_process(self): | 97 def renderer_process(self): |
98 return self._renderer_process | 98 return self._renderer_process |
99 | 99 |
100 @property | 100 @property |
101 def smooth_records(self): | 101 def smooth_records(self): |
102 return self._smooth_records | 102 return self._smooth_records |
OLD | NEW |