| 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 logging | 5 import logging |
| 6 import time | 6 import time |
| 7 import urlparse | 7 import urlparse |
| 8 | 8 |
| 9 from telemetry.core import exceptions | 9 from telemetry.core import exceptions |
| 10 from telemetry.internal.actions.drag import DragAction | 10 from telemetry.internal.actions.drag import DragAction |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 from telemetry.internal.actions.swipe import SwipeAction | 28 from telemetry.internal.actions.swipe import SwipeAction |
| 29 from telemetry.internal.actions.tap import TapAction | 29 from telemetry.internal.actions.tap import TapAction |
| 30 from telemetry.internal.actions.wait import WaitForElementAction | 30 from telemetry.internal.actions.wait import WaitForElementAction |
| 31 from telemetry.web_perf import timeline_interaction_record | 31 from telemetry.web_perf import timeline_interaction_record |
| 32 | 32 |
| 33 from py_trace_event import trace_event | 33 from py_trace_event import trace_event |
| 34 | 34 |
| 35 import py_utils | 35 import py_utils |
| 36 | 36 |
| 37 | 37 |
| 38 _DUMP_WAIT_TIME = 3 | 38 _DUMP_WAIT_TIME = 5 |
| 39 | 39 |
| 40 | 40 |
| 41 class ActionRunner(object): | 41 class ActionRunner(object): |
| 42 | 42 |
| 43 __metaclass__ = trace_event.TracedMetaClass | 43 __metaclass__ = trace_event.TracedMetaClass |
| 44 | 44 |
| 45 def __init__(self, tab, skip_waits=False): | 45 def __init__(self, tab, skip_waits=False): |
| 46 self._tab = tab | 46 self._tab = tab |
| 47 self._skip_waits = skip_waits | 47 self._skip_waits = skip_waits |
| 48 | 48 |
| (...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 marker=timeline_interaction_record.GetJavaScriptMarker( | 852 marker=timeline_interaction_record.GetJavaScriptMarker( |
| 853 self._label, self._flags)) | 853 self._label, self._flags)) |
| 854 | 854 |
| 855 def End(self): | 855 def End(self): |
| 856 assert self._started | 856 assert self._started |
| 857 self._started = False | 857 self._started = False |
| 858 self._action_runner.ExecuteJavaScript( | 858 self._action_runner.ExecuteJavaScript( |
| 859 'console.timeEnd({{ marker }});', | 859 'console.timeEnd({{ marker }});', |
| 860 marker=timeline_interaction_record.GetJavaScriptMarker( | 860 marker=timeline_interaction_record.GetJavaScriptMarker( |
| 861 self._label, self._flags)) | 861 self._label, self._flags)) |
| OLD | NEW |