Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2012 The Chromium Authors. All rights reserved. | 1 # Copyright 2012 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 import exceptions | 7 from telemetry.core import exceptions |
| 8 | 8 |
| 9 from py_trace_event import trace_event | 9 from py_trace_event import trace_event |
| 10 | 10 |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 232 | 232 |
| 233 Raises: | 233 Raises: |
| 234 py_utils.TimeoutException | 234 py_utils.TimeoutException |
| 235 exceptions.EvaluationException | 235 exceptions.EvaluationException |
| 236 exceptions.WebSocketException | 236 exceptions.WebSocketException |
| 237 exceptions.DevtoolsTargetCrashException | 237 exceptions.DevtoolsTargetCrashException |
| 238 """ | 238 """ |
| 239 return self._inspector_backend.WaitForJavaScriptCondition(*args, **kwargs) | 239 return self._inspector_backend.WaitForJavaScriptCondition(*args, **kwargs) |
| 240 | 240 |
| 241 def EnableAllContexts(self): | 241 def EnableAllContexts(self): |
| 242 """Enable all contexts in a page. Returns the number of available contexts. | 242 """Enable all contexts in a page. Returns all available context ids. |
| 243 | |
| 244 Returns: | |
| 245 A list of frame context ids. Each |context_id| can be used for | |
| 246 executing Javascript in the corresponding iframe through | |
| 247 tab.ExecuteJavaScript(..., context_id=context_id) and | |
| 248 ab.EvaluateJavaScript(..., context_id=context_id). | |
|
wkorman
2017/09/20 20:11:04
Missing 't'
| |
| 243 | 249 |
| 244 Raises: | 250 Raises: |
| 245 exceptions.WebSocketDisconnected | 251 exceptions.WebSocketDisconnected |
| 246 py_utils.TimeoutException | 252 py_utils.TimeoutException |
| 247 exceptions.DevtoolsTargetCrashException | 253 exceptions.DevtoolsTargetCrashException |
| 248 """ | 254 """ |
| 249 return self._inspector_backend.EnableAllContexts() | 255 return self._inspector_backend.EnableAllContexts() |
| 250 | 256 |
| 251 def WaitForNavigate(self, timeout=DEFAULT_WEB_CONTENTS_TIMEOUT): | 257 def WaitForNavigate(self, timeout=DEFAULT_WEB_CONTENTS_TIMEOUT): |
| 252 """Waits for the navigation to complete. | 258 """Waits for the navigation to complete. |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 373 exceptions.DevtoolsTargetCrashException | 379 exceptions.DevtoolsTargetCrashException |
| 374 """ | 380 """ |
| 375 return self._inspector_backend.DispatchKeyEvent( | 381 return self._inspector_backend.DispatchKeyEvent( |
| 376 key_event_type=key_event_type, modifiers=modifiers, timestamp=timestamp, | 382 key_event_type=key_event_type, modifiers=modifiers, timestamp=timestamp, |
| 377 text=text, unmodified_text=unmodified_text, | 383 text=text, unmodified_text=unmodified_text, |
| 378 key_identifier=key_identifier, dom_code=dom_code, dom_key=dom_key, | 384 key_identifier=key_identifier, dom_code=dom_code, dom_key=dom_key, |
| 379 windows_virtual_key_code=windows_virtual_key_code, | 385 windows_virtual_key_code=windows_virtual_key_code, |
| 380 native_virtual_key_code=native_virtual_key_code, | 386 native_virtual_key_code=native_virtual_key_code, |
| 381 auto_repeat=auto_repeat, is_keypad=is_keypad, | 387 auto_repeat=auto_repeat, is_keypad=is_keypad, |
| 382 is_system_key=is_system_key, timeout=timeout) | 388 is_system_key=is_system_key, timeout=timeout) |
| OLD | NEW |