Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: telemetry/telemetry/internal/browser/web_contents.py

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 from telemetry.core import util 8 from telemetry.core import util
9 9
10 DEFAULT_WEB_CONTENTS_TIMEOUT = 90 10 DEFAULT_WEB_CONTENTS_TIMEOUT = 90
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 exceptions.DevtoolsTargetCrashException 300 exceptions.DevtoolsTargetCrashException
301 """ 301 """
302 return self._inspector_backend.SynthesizeScrollGesture( 302 return self._inspector_backend.SynthesizeScrollGesture(
303 x=x, y=y, xDistance=xDistance, yDistance=yDistance, 303 x=x, y=y, xDistance=xDistance, yDistance=yDistance,
304 xOverscroll=xOverscroll, yOverscroll=yOverscroll, 304 xOverscroll=xOverscroll, yOverscroll=yOverscroll,
305 preventFling=preventFling, speed=speed, 305 preventFling=preventFling, speed=speed,
306 gestureSourceType=gestureSourceType, repeatCount=repeatCount, 306 gestureSourceType=gestureSourceType, repeatCount=repeatCount,
307 repeatDelayMs=repeatDelayMs, 307 repeatDelayMs=repeatDelayMs,
308 interactionMarkerName=interactionMarkerName, 308 interactionMarkerName=interactionMarkerName,
309 timeout=timeout) 309 timeout=timeout)
310
311 def DispatchKeyEvent(self, keyEventType='char', modifiers=None,
312 timestamp=None, text=None, unmodifiedText=None,
313 keyIdentifier=None, domCode=None, domKey=None,
314 windowsVirtualKeyCode=None, nativeVirtualKeyCode=None,
315 autoRepeat=None, isKeypad=None, isSystemKey=None,
316 timeout=60):
317 """Dispatches a key event to the page.
318
319 Args:
320 type: Type of the key event. Allowed values: 'keyDown', 'keyUp',
321 'rawKeyDown', 'char'.
322 modifiers: Bit field representing pressed modifier keys. Alt=1, Ctrl=2,
323 Meta/Command=4, Shift=8 (default: 0).
324 timestamp: Time at which the event occurred. Measured in UTC time in
325 seconds since January 1, 1970 (default: current time).
326 text: Text as generated by processing a virtual key code with a keyboard
327 layout. Not needed for for keyUp and rawKeyDown events (default: '').
328 unmodifiedText: Text that would have been generated by the keyboard if no
329 modifiers were pressed (except for shift). Useful for shortcut
330 (accelerator) key handling (default: "").
331 keyIdentifier: Unique key identifier (e.g., 'U+0041') (default: '').
332 windowsVirtualKeyCode: Windows virtual key code (default: 0).
333 nativeVirtualKeyCode: Native virtual key code (default: 0).
334 autoRepeat: Whether the event was generated from auto repeat (default:
335 False).
336 isKeypad: Whether the event was generated from the keypad (default:
337 False).
338 isSystemKey: Whether the event was a system key event (default: False).
339
340 Raises:
341 exceptions.TimeoutException
342 exceptions.DevtoolsTargetCrashException
343 """
344 return self._inspector_backend.DispatchKeyEvent(
345 keyEventType=keyEventType, modifiers=modifiers, timestamp=timestamp,
346 text=text, unmodifiedText=unmodifiedText, keyIdentifier=keyIdentifier,
347 domCode=domCode, domKey=domKey,
348 windowsVirtualKeyCode=windowsVirtualKeyCode,
349 nativeVirtualKeyCode=nativeVirtualKeyCode, autoRepeat=autoRepeat,
350 isKeypad=isKeypad, isSystemKey=isSystemKey, timeout=timeout)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698