Skip to content

Commit 7726454

Browse files
LanWei22chromium-wpt-export-bot
authored andcommitted
Simulate user inputs in css/selectors/focus-visible-012.html
Use testdriver Action API to simulate key actions in css/selectors/focus-visible-012.html. Bug: 1145677 Change-Id: I14a5362801ac407ad6129d02feb7003960485cf9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2551229 Commit-Queue: Lan Wei <[email protected]> Reviewed-by: Mustaq Ahmed <[email protected]> Cr-Commit-Position: refs/heads/master@{#831148}
1 parent 1783c9b commit 7726454

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

css/selectors/focus-visible-012-manual.html renamed to css/selectors/focus-visible-012.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
<link rel="help" href="https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo" />
88
<script src="/resources/testharness.js"></script>
99
<script src="/resources/testharnessreport.js"></script>
10+
<script src="/resources/testdriver.js"></script>
11+
<script src="/resources/testdriver-actions.js"></script>
12+
<script src="/resources/testdriver-vendor.js"></script>
1013
<style>
1114
:focus-visible {
1215
outline: 0;
@@ -48,9 +51,14 @@
4851
t.done();
4952
}));
5053

51-
window.setTimeout(t.step_func_done(()=> {
54+
t.step_timeout(() => {
5255
assert_true(false, "timeout");
53-
}), 1000);
56+
}, 1000);
57+
58+
const ctrl_key = '\uE009';
59+
test_driver.click(el).then(() => {
60+
return test_driver.send_keys(el, ctrl_key);
61+
});
5462

5563
</script>
5664
</body>

0 commit comments

Comments
 (0)