diff options
Diffstat (limited to 'testing/web-platform/tests/html/interaction/focus/focusgroup/tentative/resources/focusgroup-utils.js')
-rw-r--r-- | testing/web-platform/tests/html/interaction/focus/focusgroup/tentative/resources/focusgroup-utils.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/interaction/focus/focusgroup/tentative/resources/focusgroup-utils.js b/testing/web-platform/tests/html/interaction/focus/focusgroup/tentative/resources/focusgroup-utils.js new file mode 100644 index 0000000000..9a1a14a301 --- /dev/null +++ b/testing/web-platform/tests/html/interaction/focus/focusgroup/tentative/resources/focusgroup-utils.js @@ -0,0 +1,15 @@ +/* + Methods for testing the focusgroup feature. +*/ + +// https://w3c.github.io/webdriver/#keyboard-actions +const kArrowLeft = '\uE012'; +const kArrowUp = '\uE013'; +const kArrowRight = '\uE014'; +const kArrowDown = '\uE015'; + +// Set the focus on target and send the arrow key press event from it. +function focusAndKeyPress(target, key) { + target.focus(); + return test_driver.send_keys(target, key); +} |