| <script src="../../resources/js-test-pre.js"></script> |
| <script src="../../resources/ui-helper.js"></script> |
| <input id="input" type="text" value="foo" autofocus> |
| // iOS places the caret at the end of the input field. |
| internals.settings.setEditingBehavior("mac"); |
| description("Test for <input autofocus>"); |
| input.addEventListener("focus", (event) => { |
| requestAnimationFrame(() => { |
| shouldBe("inputFocusCount", "1"); |
| shouldBe("input.selectionStart", "0"); |
| shouldBe("input.selectionEnd", "0"); |
| <script src="../../../../resources/js-test-post.js"></script> |