Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<title>Test showPicker() does not focus the element</title>
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<body>
<script type=module>
import inputTypes from "./input-types.js";
function createElement(t, type) {
const input = document.createElement("input");
input.type = type;
document.body.append(input);
t.add_cleanup(() => input.remove());
return input;
}
for (const inputType of inputTypes) {
promise_test(async (t) => {
const input = createElement(t, inputType);
await test_driver.bless('show picker');
input.showPicker();
assert_not_equals(input, document.activeElement, "Input element was not focused");
}, `input[type=${inputType}].showPicker() does not focus the element`);
}
</script>