Commit 54a8366f authored by Lan Wei's avatar Lan Wei Committed by Commit Bot

Simulate user inputs in css/selectors/focus-visible-001.html

Use testdriver Action API to simulate key actions in
css/selectors/focus-visible-001.html.

Bug: 1145677
Change-Id: I5f39a03b41624e2a12c523dc9b1a0a509925621a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2546602Reviewed-by: default avatarMustaq Ahmed <mustaq@chromium.org>
Commit-Queue: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#831103}
parent 4617a6bb
......@@ -7,6 +7,9 @@
<link rel="help" href="https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<style>
:focus-visible {
outline: darkgreen dotted 1px; /* fallback for Edge */
......@@ -34,6 +37,9 @@
assert_equals(getComputedStyle(el).outlineColor, "rgb(0, 100, 0)");
t.done();
}));
const tab_key = '\ue004';
test_driver.send_keys(el, tab_key)
.catch(e => t.step_func(() => assert_unreached("Actions sequence failed " + e)));
}, "Keyboard focus should match :focus-visible");
</script>
</body>
......
importAutomationScript('/input-events/inputevent_common_input.js');
function inject_input() {
return keyDown("Tab");
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment